diff --git a/common/basic.js b/common/basic.js
index b170962e..35db63a2 100644
--- a/common/basic.js
+++ b/common/basic.js
@@ -715,6 +715,66 @@ export function getTodayDate() {
return startTime + "," + endTime;
}
+export function getCurrDateOneMonthsTimes() {
+ var end = Date.now()
+ // var end = new Date('2019/12/31 15:18').getTime()
+ var day = 31
+ var enda = new Date(end);
+ var endm = enda.getMonth() + 1;
+ var d = enda.getDate();
+ if (endm == 4 || endm == 6 || endm == 9 || endm == 11) {
+ day = 30
+ } else {
+ if (d == 31) {
+ day = 30
+ }
+ if (endm == 7 || endm == 12) {
+ day = 31
+ }
+ }
+ if (endm == 1) {
+ var endy = enda.getFullYear();
+ day = 31
+ if (d == 31) {
+ day = 28
+ }
+ if (d == 30) {
+ day = 29
+ }
+ if (d == 29) {
+ day = 30
+ }
+ if (endy % 4 == 0) {
+ day = 31
+ if (d == 31) {
+ day = 29
+ }
+ if (d == 30) {
+ day = 30
+ }
+ if (d == 29) {
+ day = 31
+ }
+ }
+ }
+ if (endm == 2) {
+ var endy = enda.getFullYear();
+ day = 28
+ if (endy % 4 == 0) {
+ day = 29
+ }
+ }
+ var start = 1000 * 60 * 60 * 24 * day
+ var interval = end + start;
+ return interval;
+}
+
+
+export function getCurrDateTimes() {
+ var time = (new Date()).getTime();
+ return time;
+}
+
export function getCurrDate() {
var date = new Date();
return getDate(date);
@@ -733,11 +793,11 @@ export function getISODateTime() {
//格式化处理
export function dateFormat(time) {
var result = ""
- if(time!=null){
+ if (time != null) {
let date = new Date(time);
result = getDate(date) + " " + getTime(date);
}
-
+
return result;
}
diff --git a/common/directory.js b/common/directory.js
index 0ae9dfd8..80c38b53 100644
--- a/common/directory.js
+++ b/common/directory.js
@@ -9,6 +9,7 @@ let containerTypeList = [];
let packUnitList = [];
let requestStatusList = [];
let unplannedReceiptReasonList = [];
+let unplannedIssueReasonList = [];
let unplannedIissueReason = [];
let scrapReasonList = [];
let inspectFailedReasonList = [];
@@ -42,6 +43,7 @@ export function clearCacheData() {
packUnitList = [];
requestStatusList = [];
unplannedReceiptReasonList = [];
+ unplannedIssueReasonList=[];
unplannedIissueReason = [];
scrapReasonList = [];
inspectFailedReasonList = [];
@@ -329,7 +331,7 @@ export function getUnPlannedReceiptReasonList(value) {
}
unplannedReceiptReasonList.forEach(res => {
res.text = res.label;
- res.value = res.code
+ res.value = res.value
})
return unplannedReceiptReasonList
}
@@ -341,7 +343,7 @@ export function getUnPlannedIssuseReasonList(value) {
}
unplannedIssueReasonList.forEach(res => {
res.text = res.label;
- res.value = res.code
+ res.value = res.value
})
return unplannedIssueReasonList
}
@@ -353,7 +355,7 @@ export function getScarpReasonList(value) {
}
scrapReasonList.forEach(res => {
res.text = res.label;
- res.value = res.code
+ res.value = res.value
})
return scrapReasonList
}
diff --git a/pages/unPlanned/record/issueRecord.vue b/pages/unPlanned/record/issueRecord.vue
index baa9f62a..5688e903 100644
--- a/pages/unPlanned/record/issueRecord.vue
+++ b/pages/unPlanned/record/issueRecord.vue
@@ -102,7 +102,6 @@
detailSource: [], //绑定在页面上的数据源
reason: "",
reasonList: [],
- fromType: "",
dataContent:{}
}
},
@@ -121,12 +120,6 @@
},
onLoad(option) {
- this.fromType = option.fromType
- if (this.fromType == "requestType") {
- updateTitle("计划外出库申请")
- } else {
- updateTitle("计划外出库记录")
- }
},
methods: {
@@ -223,24 +216,7 @@
this.showErrorMessage("请选择出库原因")
return;
}
-
- if(this.fromType=="requestType"){
- var params = this.setRequestParams();
- console.log("提交参数",JSON.stringify(params));
-
-
- // unPlannedIssueRequestSubmit(params).then(res => {
- // uni.hideLoading()
- // if (res.data) {
- // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, )
- // } else {
- // this.showErrorMessage("提交失败[" + res.msg + "]")
- // }
- // }).catch(error => {
- // uni.hideLoading()
- // this.showErrorMessage(error)
- // })
- }else {
+ var params =this.setParams()
// unPlannedIssueRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
@@ -252,7 +228,6 @@
// uni.hideLoading()
// this.showErrorMessage(error)
// })
- }
},
setParams() {
@@ -271,31 +246,6 @@
return subList;
},
- setRequestParams(){
- var subList = []
- var supplierCode=""
- this.detailSource.forEach(item => {
- item.subList.forEach(detail => {
- if (detail.scaned) {
- if(supplierCode==""){
- supplierCode = detail.package.supplierCode
- }
- subList.push(detail)
- }
- })
- })
-
- this.dataContent.subList = subList
- this.dataContent.supplierCode = supplierCode
- this.dataContent.businessType = "PurchasePutaway"
- this.dataContent.departmentCode= "研发部门";
- this.dataContent.status= 1 ;
- this.dataContent.autoCommit = "FALSE";
- this.dataContent.autoAgree = "FALSE";
- this.dataContent.autoExecute = "FALSE";
- this.dataContent.directCreateRecord = "FALSE";
- return this.dataContent;
- },
}
}
diff --git a/pages/unPlanned/record/receiptRecord.vue b/pages/unPlanned/record/receiptRecord.vue
index f7e371cf..6ca5d38f 100644
--- a/pages/unPlanned/record/receiptRecord.vue
+++ b/pages/unPlanned/record/receiptRecord.vue
@@ -99,7 +99,6 @@
businessTypeCode: "UnplannedReceipt",
reason: "",
reasonList: [],
- fromType: "",
showToLoaction:true,
dataContent:{}
}
@@ -120,20 +119,9 @@
},
onLoad(option) {
- this.fromType = option.fromType
- this.updateTitle();
},
methods: {
- updateTitle(){
- if (this.fromType == "requestType") {
- updateTitle("计划外入库申请")
- this.showToLoaction =false
- } else {
- updateTitle("计划外入库记录")
- this.showToLoaction =true
- }
- },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
@@ -249,21 +237,6 @@
return;
}
- if(this.fromType=="requestType"){
- var params = this.setRequestParams()
- console.log("提交" + JSON.stringify(params))
- // unPlannedReceiptRequestbSubmit(params).then(res => {
- // uni.hideLoading()
- // if (res.data) {
- // this.showCommitSuccessMessage("提交成功
生成计划外入库申请" + res.data, )
- // } else {
- // this.showErrorMessage("提交失败[" + res.msg + "]")
- // }
- // }).catch(error => {
- // uni.hideLoading()
- // this.showErrorMessage(error)
- // })
- }else {
//记录有目标库位,需要查询管理模式
var itemCodes = []
this.detailSource.forEach(item => {
@@ -292,7 +265,6 @@
this.showErrorMessage(res.message);
}
});
- }
},
setParams(queryModel) {
@@ -328,32 +300,6 @@
return this.dataContent;
},
- setRequestParams(){
- var subList = []
- var supplierCode=""
- this.detailSource.forEach(item => {
- item.subList.forEach(detail => {
- if (detail.scaned) {
- if(supplierCode==""){
- supplierCode = detail.package.supplierCode
- }
- subList.push(detail)
- }
- })
- })
-
- this.dataContent.subList = subList
- this.dataContent.supplierCode = supplierCode
- this.dataContent.businessType = "PurchasePutaway"
- this.dataContent.departmentCode= "研发部门";
- this.dataContent.status= 1 ;
- this.dataContent.autoCommit = "FALSE";
- this.dataContent.autoAgree = "FALSE";
- this.dataContent.autoExecute = "FALSE";
- this.dataContent.directCreateRecord = "FALSE";
- return this.dataContent;
- },
-
}
}
diff --git a/pages/unPlanned/request/issueRequestCreate.vue b/pages/unPlanned/request/issueRequestCreate.vue
index baa9f62a..eb6dedbc 100644
--- a/pages/unPlanned/request/issueRequestCreate.vue
+++ b/pages/unPlanned/request/issueRequestCreate.vue
@@ -3,36 +3,42 @@
-
-
-
-
-
-
-
-
-
+
+
+ 出库原因:
+
+
+
-
-
-
-
-