Browse Source

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

hella_vue3
niexiting 8 months ago
parent
commit
b2996bc205
  1. 22
      src/api/request2.js
  2. 22
      src/common/basic.js
  3. 12
      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. 40
      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 {*}

22
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) {

12
src/mycomponents/location/locationCompare.vue

@ -5,6 +5,7 @@
padding-right: 10rpx;
font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view class="flex uni-row" v-if="isShowEdit" >
<view >
<text style="font-size: 30rpx;">{{title}}</text>
@ -12,7 +13,16 @@
<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> -->
</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()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text>

54
src/pages.json

@ -818,6 +818,60 @@
"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": {

8
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) {

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%; ">
<view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationCode="toLocationCode"
:isShowEdit="isCheckLocation"
@getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class=" uni-flex uni-row">
@ -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');
}

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

@ -8,8 +8,7 @@
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item
:right-options="item.status=='2'?detailGiveupOptions:detailOptions"
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)">
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'>
</com-product-job-card>
@ -35,6 +34,7 @@
import {
goHome,
updateTitle,
getSwitchInfoByCode
} from '@/common/basic.js';
import {
@ -72,8 +72,11 @@
detailGiveupOptions: [],
};
},
props: {
type: 'assemble',
},
onShow() {
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({
@ -142,6 +153,12 @@
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
});
},

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%; ">
<view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationCode="toLocationCode" :isShowEdit="isCheckLocation" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class=" uni-flex uni-row">
@ -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');
}

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

@ -28,7 +28,7 @@
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationCode="toLocationCode" @getLocation='scanLocationCode' :isShowEdit="isCheckLocation"
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class=" uni-flex uni-row">
@ -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');

Loading…
Cancel
Save