diff --git a/src/api/request2.js b/src/api/request2.js index 47b4db6c..2f746482 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -172,6 +172,28 @@ export function getMessageUnreadCount() { + +/** + * 获取单据开关配置 + */ +export function getSwitchByCode(code) { + var params ={ + filters:[{ + column:"code", + action:"==", + value:code + }], + pageNo:1, + pageSize:10, + } + + return request({ + url: baseApi + "/wms/switch/senior", + method: "post", + data: params + }); +} + /** * 获取配置字典 * @param {*} diff --git a/src/common/basic.js b/src/common/basic.js index d770a26d..b22c9641 100644 --- a/src/common/basic.js +++ b/src/common/basic.js @@ -17,6 +17,7 @@ let unplannedReceiptReasonList = []; let unplannedIissueReason = []; let scrapReasonList = []; let inspectFailedReasonList = []; +let switchList=[] @@ -34,6 +35,7 @@ export function clearCacheData() { unplannedIissueReason = []; scrapReasonList = []; inspectFailedReasonList = []; + switchList=[] } @@ -335,6 +337,26 @@ export function getInspectReasonList(value) { return inspectFailedReasonList } +//获取单据开关 +export function getSwitchInfoByCode(code) { + var isCheck = false + var resultInfo = "" + if (switchList.length == 0) { + switchList = uni.getStorageSync("switch") + } + + for (let item of switchList) { + if (item.code == code) { + resultInfo = item + break; + } + } + isCheck =resultInfo.effectiveSetValue=="TRUE"?true:false + return isCheck; +} + + + // //数量状态 // export function getCoutJobStatuStyle(val) { diff --git a/src/mycomponents/location/locationCompare.vue b/src/mycomponents/location/locationCompare.vue index fe715ba7..9d44998e 100644 --- a/src/mycomponents/location/locationCompare.vue +++ b/src/mycomponents/location/locationCompare.vue @@ -5,15 +5,25 @@ padding-right: 10rpx; font-size:32rpx;"> - - {{title}} - -   {{recommendLocationCode}} -  / {{locationCode}} - + + + {{title}} + +   {{recommendLocationCode}} +  / {{locationCode}} + + + - - + + + {{title}} +   {{recommendLocationCode}} + + + + + 复制 diff --git a/src/pages.json b/src/pages.json index ba0de646..0ed881d7 100644 --- a/src/pages.json +++ b/src/pages.json @@ -817,7 +817,61 @@ "navigationBarTitleText": "预生产收货详情", "enablePullDownRefresh": false } - }, + }, + + { + "path": "pages/productPutaway/job/semiProductPutawayJob", + "style": { + "navigationBarTitleText": "预生产上架任务", + "enablePullDownRefresh": true, + "titleNView": { + // "autoBackButton": "true", + "buttons": [ + // 右边按钮 + { + "float": "right", + "fontSize": "58rpx", //按钮上文字的大小 + "text": "\ue696", + "fontSrc": "/static/ali_icon/iconfont.ttf" + }, + { + + "float": "right", + "fontSize": "52rpx", //按钮上文字的大小 + "text": "\ue6e2", + "fontSrc": "/static/ali_icon/iconfont.ttf" + } + ] + } + } + }, + { + "path": "pages/productPutaway/job/fgProductPutawayJob", + "style": { + "navigationBarTitleText": "装配上架任务", + "enablePullDownRefresh": true, + "titleNView": { + // "autoBackButton": "true", + "buttons": [ + // 右边按钮 + { + "float": "right", + "fontSize": "58rpx", //按钮上文字的大小 + "text": "\ue696", + "fontSrc": "/static/ali_icon/iconfont.ttf" + }, + { + + "float": "right", + "fontSize": "52rpx", //按钮上文字的大小 + "text": "\ue6e2", + "fontSrc": "/static/ali_icon/iconfont.ttf" + } + ] + } + } + }, + { "path": "pages/productReceipt/job/fgProductReceiptJob", "style": { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 62a6be11..d8efa396 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -71,7 +71,8 @@ import { getDictionaryItem, getPackageUnitList, - getMainMessage + getMainMessage, + getSwitchByCode } from '@/api/request2.js'; export default { @@ -360,6 +361,11 @@ }).catch(res => { console.log("包装规格获取失败", res) }) + + // getSwitchByCode(code).then(res=>{ + // uni.setStorageSync("switch", res.data) + // }).catch(error=>{ + // }) }, openCheck(url) { diff --git a/src/pages/productPutaway/job/fgProductPutawayJob.vue b/src/pages/productPutaway/job/fgProductPutawayJob.vue new file mode 100644 index 00000000..9e7c41c1 --- /dev/null +++ b/src/pages/productPutaway/job/fgProductPutawayJob.vue @@ -0,0 +1,46 @@ + + + + + \ No newline at end of file diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index c329a1e0..3df6170a 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -27,7 +27,9 @@ style="background-color:ghostwhite; width: 100%; "> @@ -110,10 +112,21 @@ toLocationAreaTypeList: [], jobStatus: "", jobToLocationCode: "", + type:"", + isCheckLocation:false, + switchCode:"" }; }, onLoad(option) { this.id = option.id; + this.type =option.type; + if (this.type == 'predict') { + this.switchCode = "SemiPutawayLocationCodeValidate" + updateTitle("预生产上架任务"); + } else if(this.type == 'assemble'){ + this.switchCode = "FgPutawayLocationCodeValidate" + updateTitle("装配上架任务"); + } if (this.id != undefined) { //新建的任务自动接收 if (option.status == "1") { @@ -185,6 +198,13 @@ that.jobToLocationCode = that.subList[0].toLocationCode that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.detailSource = getDataSource(that.subList) + + that.isCheckLocation = getSwitchInfoByCode(that.switchCode) + if (that.isCheckLocation) { + that.toLocationCode = "" + } else { + that.toLocationCode = that.jobToLocationCode; + } } else { that.showMessage('列表数据为0'); } diff --git a/src/pages/productPutaway/job/productPutawayJob.vue b/src/pages/productPutaway/job/productPutawayJob.vue index 628284fb..fea1585f 100644 --- a/src/pages/productPutaway/job/productPutawayJob.vue +++ b/src/pages/productPutaway/job/productPutawayJob.vue @@ -8,8 +8,7 @@ - @@ -35,6 +34,7 @@ import { goHome, updateTitle, + getSwitchInfoByCode } from '@/common/basic.js'; import { @@ -72,8 +72,11 @@ detailGiveupOptions: [], }; }, - - onShow() { + props: { + type: 'assemble', + }, + + mounted() { this.getList('refresh'); }, @@ -114,7 +117,15 @@ }, methods: { - + toHome() { + goHome() + }, + openFilter() { + this.$refs.filter.openFilter(); + }, + refresh() { + this.getList('refresh'); + }, getList(type) { let that = this; uni.showLoading({ @@ -135,13 +146,19 @@ value: this.todayTime }) } - + filters.push({ column: "status", action: "in", value: this.status }) + filters.push({ + column: "type", + action: "==", + value: this.type + }) + var params = { filters: filters, pageNo: this.pageNo, @@ -156,19 +173,28 @@ var list = res.data.list; this.totalCount = res.data.total this.loadingType = "loadmore"; + if (this.type == 'predict') { + updateTitle("预生产上架任务(" + this.totalCount + ")"); + } else if (this.type == 'assemble') { + updateTitle("装配上架任务(" + this.totalCount + ")"); + } if (list == null || list.length == 0) { this.loadingType = "nomore"; return; } this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.pageNo++; - updateTitle("制品上架任务(" + this.totalCount + ")"); + }).catch(error => { if (type === "refresh") { uni.stopPullDownRefresh(); } - updateTitle("制品上架任务"); + if (this.type == 'predict') { + updateTitle("预生产上架任务(" + this.totalCount + ")"); + } else if (this.type == 'assemble') { + updateTitle("装配上架任务(" + this.totalCount + ")"); + } this.loadingType = ""; uni.hideLoading(); that.showMessage(error) @@ -177,7 +203,7 @@ openJobDetail(item) { uni.navigateTo({ - url: './productPutawayDetail?id=' + item.id + '&status=' + item.status + url: './productPutawayDetail?id=' + item.id + '&type=' + item.type }); }, @@ -208,12 +234,12 @@ cancleJob(id) { cancleTakeProductPutawayJob(id).then(res => { - if(res.data){ + if (res.data) { this.getList("refresh") uni.showToast({ - title:"放弃任务成功" + title: "放弃任务成功" }) - }else { + } else { this.showMessage("放弃任务失败") } }).catch(error => { @@ -252,7 +278,7 @@ action: "==", value: code }) - + var params = { filters: filters, pageNo: 1, @@ -284,4 +310,4 @@ + \ No newline at end of file diff --git a/src/pages/productPutaway/job/semiProductPutawayJob.vue b/src/pages/productPutaway/job/semiProductPutawayJob.vue new file mode 100644 index 00000000..6506d86b --- /dev/null +++ b/src/pages/productPutaway/job/semiProductPutawayJob.vue @@ -0,0 +1,46 @@ + + + + + \ No newline at end of file diff --git a/src/pages/productionReceipt/job/productionReceiptDetail.vue b/src/pages/productionReceipt/job/productionReceiptDetail.vue index 83f64436..a23ef4d4 100644 --- a/src/pages/productionReceipt/job/productionReceiptDetail.vue +++ b/src/pages/productionReceipt/job/productionReceiptDetail.vue @@ -29,7 +29,7 @@ style="background-color:ghostwhite; width: 100%; "> @@ -56,14 +56,16 @@ getBasicLocationByCode, takeProductionReceiptJob, cancleTakeProductionReceiptJob, - productionReceiptJobSubmit + productionReceiptJobSubmit, + getSwitchByCode } from '@/api/request2.js'; import { goHome, navigateBack, getCurrDateTime, getPackingNumberAndBatch, - getInventoryStatusName + getInventoryStatusName, + getSwitchInfoByCode } from '@/common/basic.js'; import { getDataSource, @@ -107,6 +109,7 @@ toLocationAreaTypeList: [], jobStatus: "", jobToLocationCode: "", + isCheckLocation: false }; }, onLoad(option) { @@ -182,6 +185,12 @@ that.jobToLocationCode = that.subList[0].toLocationCode that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.detailSource = getDataSource(that.subList) + that.isCheckLocation = getSwitchInfoByCode("IssueToLocationCodeValidate") + if (that.isCheckLocation) { + that.toLocationCode = "" + } else { + that.toLocationCode = that.jobToLocationCode; + } } else { that.showMessage('列表数据为0'); } diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue index 6e20152d..770cf474 100644 --- a/src/pages/putaway/job/putawayDetail.vue +++ b/src/pages/putaway/job/putawayDetail.vue @@ -28,7 +28,7 @@ style="background-color:ghostwhite; width: 100%; "> @@ -55,14 +55,16 @@ getBasicLocationByCode, putawayJobSubmit, takePutawayJob, - cancleTakePutawayJob + cancleTakePutawayJob, + getSwitchByCode } from '@/api/request2.js'; import { goHome, getCurrDateTime, getPackingNumberAndBatch, navigateBack, - compareAsc + compareAsc, + getSwitchInfoByCode } from '@/common/basic.js'; import { @@ -105,6 +107,7 @@ toLocationAreaTypeList: [], jobStatus: "", jobToLocationCode: "", + isCheckLocation: false }; }, onLoad(option) { @@ -119,6 +122,7 @@ this.getDetail(); } } + }, //返回首页 onNavigationBarButtonTap(e) { @@ -185,6 +189,12 @@ that.fromLocationCode = that.subList[0].fromLocationCode that.jobToLocationCode = that.subList[0].toLocationCode; that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) + that.isCheckLocation = getSwitchInfoByCode("PurchasePutawayToLocationCodeValidate") + if (that.isCheckLocation) { + that.toLocationCode = "" + } else { + that.toLocationCode = that.jobToLocationCode; + } } else { that.showMessage('列表数据为0');