Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into master_hella

hella_vue3
niexiting 7 months ago
parent
commit
b2996bc205
  1. 22
      src/api/request2.js
  2. 22
      src/common/basic.js
  3. 14
      src/mycomponents/location/locationCompare.vue
  4. 54
      src/pages.json
  5. 8
      src/pages/index/index.vue
  6. 46
      src/pages/productPutaway/job/fgProductPutawayJob.vue
  7. 22
      src/pages/productPutaway/job/productPutawayDetail.vue
  8. 46
      src/pages/productPutaway/job/productPutawayJob.vue
  9. 46
      src/pages/productPutaway/job/semiProductPutawayJob.vue
  10. 15
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  11. 16
      src/pages/putaway/job/putawayDetail.vue

22
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 {*} * @param {*}

22
src/common/basic.js

@ -17,6 +17,7 @@ let unplannedReceiptReasonList = [];
let unplannedIissueReason = []; let unplannedIissueReason = [];
let scrapReasonList = []; let scrapReasonList = [];
let inspectFailedReasonList = []; let inspectFailedReasonList = [];
let switchList=[]
@ -34,6 +35,7 @@ export function clearCacheData() {
unplannedIissueReason = []; unplannedIissueReason = [];
scrapReasonList = []; scrapReasonList = [];
inspectFailedReasonList = []; inspectFailedReasonList = [];
switchList=[]
} }
@ -335,6 +337,26 @@ export function getInspectReasonList(value) {
return inspectFailedReasonList 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) { // export function getCoutJobStatuStyle(val) {

14
src/mycomponents/location/locationCompare.vue

@ -5,14 +5,24 @@
padding-right: 10rpx; padding-right: 10rpx;
font-size:32rpx;"> font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation"> <view class="uni-flex uni-row u-col-center" @click="showLocation">
<view> <view class="flex uni-row" v-if="isShowEdit" >
<view >
<text style="font-size: 30rpx;">{{title}}</text> <text style="font-size: 30rpx;">{{title}}</text>
<text style="font-size: 25rpx;color:#3FBAFF;">&nbsp {{recommendLocationCode}}</text> <text style="font-size: 25rpx;color:#3FBAFF;">&nbsp {{recommendLocationCode}}</text>
<text v-if="locationCode" style="font-size: 25rpx;color:#3FBAFF;">&nbsp/&nbsp{{locationCode}}</text> <text v-if="locationCode" style="font-size: 25rpx;color:#3FBAFF;">&nbsp/&nbsp{{locationCode}}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> --> <!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view> </view>
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> <image style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view>
<view class="" v-else>
<view >
<text style="font-size: 30rpx;">{{title}}</text>
<text style="font-size: 25rpx;color:#3FBAFF;">&nbsp {{recommendLocationCode}}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
</view>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> <view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> <text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text>

54
src/pages.json

@ -818,6 +818,60 @@
"enablePullDownRefresh": false "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", "path": "pages/productReceipt/job/fgProductReceiptJob",
"style": { "style": {

8
src/pages/index/index.vue

@ -71,7 +71,8 @@
import { import {
getDictionaryItem, getDictionaryItem,
getPackageUnitList, getPackageUnitList,
getMainMessage getMainMessage,
getSwitchByCode
} from '@/api/request2.js'; } from '@/api/request2.js';
export default { export default {
@ -360,6 +361,11 @@
}).catch(res => { }).catch(res => {
console.log("包装规格获取失败", res) console.log("包装规格获取失败", res)
}) })
// getSwitchByCode(code).then(res=>{
// uni.setStorageSync("switch", res.data)
// }).catch(error=>{
// })
}, },
openCheck(url) { openCheck(url) {

46
src/pages/productPutaway/job/fgProductPutawayJob.vue

@ -0,0 +1,46 @@
<template>
<view class="">
<productPutawayJob ref="productPutawayJob" type='assemble'></productPutawayJob>
</view>
</template>
<script>
import productPutawayJob from '@/pages/productPutaway/job/productPutawayJob.vue'
export default {
name: 'productPutawayJob',
components: {
productPutawayJob
},
data() {
return {
};
},
onShow() {
if(this.$refs.productPutawayJob!=undefined){
this.$refs.productPutawayJob.refresh();
}
},
onPullDownRefresh() {
this.$refs.productPutawayJob.refresh();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.productreceiptjob.toHome();
} else if (e.index == 1) {
this.$refs.productreceiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

22
src/pages/productPutaway/job/productPutawayDetail.vue

@ -27,7 +27,9 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode" <locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode' :locationCode="toLocationCode"
:isShowEdit="isCheckLocation"
@getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
@ -110,10 +112,21 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "", jobToLocationCode: "",
type:"",
isCheckLocation:false,
switchCode:""
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; 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 (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -185,6 +198,13 @@
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.isCheckLocation = getSwitchInfoByCode(that.switchCode)
if (that.isCheckLocation) {
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }

46
src/pages/productPutaway/job/productPutawayJob.vue

@ -8,8 +8,7 @@
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index"> <view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item <uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
:right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'> <com-product-job-card :dataContent="item" @click='openJobDetail(item)'>
</com-product-job-card> </com-product-job-card>
@ -35,6 +34,7 @@
import { import {
goHome, goHome,
updateTitle, updateTitle,
getSwitchInfoByCode
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -72,8 +72,11 @@
detailGiveupOptions: [], detailGiveupOptions: [],
}; };
}, },
props: {
type: 'assemble',
},
onShow() { mounted() {
this.getList('refresh'); this.getList('refresh');
}, },
@ -114,7 +117,15 @@
}, },
methods: { methods: {
toHome() {
goHome()
},
openFilter() {
this.$refs.filter.openFilter();
},
refresh() {
this.getList('refresh');
},
getList(type) { getList(type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -142,6 +153,12 @@
value: this.status value: this.status
}) })
filters.push({
column: "type",
action: "==",
value: this.type
})
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -156,19 +173,28 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (this.type == 'predict') {
updateTitle("预生产上架任务(" + this.totalCount + ")");
} else if (this.type == 'assemble') {
updateTitle("装配上架任务(" + this.totalCount + ")");
}
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
return; return;
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("制品上架任务(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("制品上架任务"); if (this.type == 'predict') {
updateTitle("预生产上架任务(" + this.totalCount + ")");
} else if (this.type == 'assemble') {
updateTitle("装配上架任务(" + this.totalCount + ")");
}
this.loadingType = ""; this.loadingType = "";
uni.hideLoading(); uni.hideLoading();
that.showMessage(error) that.showMessage(error)
@ -177,7 +203,7 @@
openJobDetail(item) { openJobDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: './productPutawayDetail?id=' + item.id + '&status=' + item.status url: './productPutawayDetail?id=' + item.id + '&type=' + item.type
}); });
}, },
@ -208,12 +234,12 @@
cancleJob(id) { cancleJob(id) {
cancleTakeProductPutawayJob(id).then(res => { cancleTakeProductPutawayJob(id).then(res => {
if(res.data){ if (res.data) {
this.getList("refresh") this.getList("refresh")
uni.showToast({ uni.showToast({
title:"放弃任务成功" title: "放弃任务成功"
}) })
}else { } else {
this.showMessage("放弃任务失败") this.showMessage("放弃任务失败")
} }
}).catch(error => { }).catch(error => {

46
src/pages/productPutaway/job/semiProductPutawayJob.vue

@ -0,0 +1,46 @@
<template>
<view class="">
<productPutawayJob ref="productPutawayJob" type='predict'></productPutawayJob>
</view>
</template>
<script>
import productPutawayJob from '@/pages/productPutaway/job/productPutawayJob.vue'
export default {
name: 'productPutawayJob',
components: {
productPutawayJob
},
data() {
return {
};
},
onShow() {
if(this.$refs.productPutawayJob!=undefined){
this.$refs.productPutawayJob.refresh();
}
},
onPullDownRefresh() {
this.$refs.productPutawayJob.refresh();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.productreceiptjob.toHome();
} else if (e.index == 1) {
this.$refs.productreceiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

15
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -29,7 +29,7 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode" <locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode' :locationCode="toLocationCode" :isShowEdit="isCheckLocation" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
@ -56,14 +56,16 @@
getBasicLocationByCode, getBasicLocationByCode,
takeProductionReceiptJob, takeProductionReceiptJob,
cancleTakeProductionReceiptJob, cancleTakeProductionReceiptJob,
productionReceiptJobSubmit productionReceiptJobSubmit,
getSwitchByCode
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
navigateBack, navigateBack,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatch, getPackingNumberAndBatch,
getInventoryStatusName getInventoryStatusName,
getSwitchInfoByCode
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getDataSource, getDataSource,
@ -107,6 +109,7 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "", jobToLocationCode: "",
isCheckLocation: false
}; };
}, },
onLoad(option) { onLoad(option) {
@ -182,6 +185,12 @@
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.isCheckLocation = getSwitchInfoByCode("IssueToLocationCodeValidate")
if (that.isCheckLocation) {
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }

16
src/pages/putaway/job/putawayDetail.vue

@ -28,7 +28,7 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode" <locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode' :locationCode="toLocationCode" @getLocation='scanLocationCode' :isShowEdit="isCheckLocation"
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
@ -55,14 +55,16 @@
getBasicLocationByCode, getBasicLocationByCode,
putawayJobSubmit, putawayJobSubmit,
takePutawayJob, takePutawayJob,
cancleTakePutawayJob cancleTakePutawayJob,
getSwitchByCode
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatch, getPackingNumberAndBatch,
navigateBack, navigateBack,
compareAsc compareAsc,
getSwitchInfoByCode
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -105,6 +107,7 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "", jobToLocationCode: "",
isCheckLocation: false
}; };
}, },
onLoad(option) { onLoad(option) {
@ -119,6 +122,7 @@
this.getDetail(); this.getDetail();
} }
} }
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@ -185,6 +189,12 @@
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode; that.jobToLocationCode = that.subList[0].toLocationCode;
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.isCheckLocation = getSwitchInfoByCode("PurchasePutawayToLocationCodeValidate")
if (that.isCheckLocation) {
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');

Loading…
Cancel
Save