Browse Source

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

hella_online_20240829
niexiting 3 months ago
parent
commit
44db15d865
  1. 24
      src/api/request2.js
  2. 20
      src/common/array.js
  3. 2
      src/common/config.js
  4. 150
      src/mycomponents/print/print.vue
  5. 5
      src/pages/count/job/countLightDetail.vue
  6. 5
      src/pages/index/index.vue
  7. 39
      src/pages/issue/job/issueJob.vue
  8. 7
      src/pages/login/index.vue
  9. 13
      src/pages/package/record/overPackageRecord.vue
  10. 5
      src/pages/productReceipt/job/scrapReceiptJob.vue
  11. 1
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  12. 38
      src/pages/repleinsh/job/repleinshJob.vue
  13. 4
      src/pages/setter/index.vue

24
src/api/request2.js

@ -1418,6 +1418,18 @@ export function cancleTakeIssueJob(id) {
data: {}, data: {},
}); });
} }
/**
* 发料 关闭任务
* @param {*} id
*
*/
export function closeTakeIssueJob(id) {
return request({
url: baseApi + "/wms/issue-job-main/close?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 发料任务 提交 * 发料任务 提交
@ -3861,6 +3873,18 @@ export function cancleTakeRepleinshJob(id) {
}); });
} }
/**
* 补料任务 关闭任务
* @param {*} id
*
*/
export function closeTakeRepleinshJob(id) {
return request({
url: baseApi + "/wms/repleinsh-job-main/close?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 补料任务 提交 * 补料任务 提交
* @param {*} params * @param {*} params

20
src/common/array.js

@ -223,7 +223,7 @@ export function getDetailEditRemoveOption() {
} }
//详情编辑放弃 //详情编辑关闭
export function getDetailGiveupOption() { export function getDetailGiveupOption() {
let option_detail_giveup = [{ let option_detail_giveup = [{
text: '详情', text: '详情',
@ -241,7 +241,23 @@ export function getDetailGiveupOption() {
return option_detail_giveup; return option_detail_giveup;
} }
//详情放弃
export function getDetailCloseOption() {
let option_detail_giveup = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '关闭',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail_giveup;
}
//详情编辑移除 //详情编辑移除
export function getEditRemoveOption() { export function getEditRemoveOption() {

2
src/common/config.js

@ -0,0 +1,2 @@
export const overPagePrint="overPage_print"
export const overPageTemplate="overPage_Template"

150
src/mycomponents/print/print.vue

@ -0,0 +1,150 @@
<template>
<view class="uni-flex uni-column" style="width: 100%; ">
<view class="title " style="display: flex; align-items: center;padding: 10rpx;">
<text style=" flex-shrink: 0;width: 22%; font-size: 35rpx; font-weight: bold;">打印机 :</text>
<view class="uni-flex" style="uni-row; width: 78%; justify-content: space-between; align-items: center; ">
<view class="customerBorder" @click="showSelectPrint">
{{printName}}
</view>
<u-select v-model="showPrintSelect" mode="mutil-column-auto"
:list="printList" @confirm="confirmSelectPrint"></u-select>
<view class="" style="">
<image src="/static/icons/down.svg" mode=""
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" @click="showSelectPrint">
</image>
</view>
</view>
</view>
<view class='split_line'></view>
<view class="title " style="display: flex; align-items: center;padding: 10rpx;">
<text style="flex-shrink: 0;width: 22%; font-size: 35rpx; font-weight: bold;">模版 :</text>
<view class="uni-flex" style="uni-row; width: 78%; justify-content: space-between; align-items: center; ">
<view class="customerBorder" @click="showSelectTemplate">
{{templateName}}
</view>
<u-select v-model="showTemplateSelect" mode="mutil-column-auto"
:list="templateList" @confirm="confirmSelectTemplate"></u-select>
<view class="">
<image src="/static/icons/down.svg" mode=""
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" @click="showSelectTemplate">
</image>
</view>
</view>
</view>
<view class='split_line'></view>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getPrintList,
getPrintTemplateList
} from '@/api/request2.js';
export default {
data() {
return {
showPrintSelect:false,
printName:"请选择打印机",
printCode:"",
showTemplateSelect:false,
templateName:"请选择打印模版",
templateCode:"",
printList:[],
templateList:[]
};
},
//
props: {
// printList: {
// type: Array,
// default() {
// return [];
// }
// },
// templateList: {
// type: Array,
// default() {
// return [];
// }
// },
// printDeafult:{
// type:String,
// default:""
// },
// templateDeafult:{
// type:String,
// default:""
// },
},
methods: {
setDefaultData(printDeafult,templateDeafult){
this.templateName =printDeafult.name
this.printCode =printDeafult.code
this.templateName =templateDeafult.name
this.templateCode =templateDeafult.code
},
showErrorMessage(message, type) {
setTimeout(r => {
this.$refs.comMessage.showErrorMessage(message, res => {})
})
},
showSelectPrint(){
this.showPrintSelect =true
uni.showLoading({
title:"加载中",
mask:true
})
getPrintList().then(res=>{
this.printList =[]
}).catch(error=>{
})
},
confirmSelectPrint(){
this.printCode =""
this.$emit("printCode",this.printCode)
},
showSelectTemplate(){
this.showTemplateSelect =true
uni.showLoading({
title:"加载中",
mask:true
})
getPrintTemplateList().then(res=>{
this.templateList =[]
}).catch(error=>{
})
},
confirmSelectTemplate(){
this.templateCode =""
this.$emit("templateCode",this.templateCode)
}
}
}
</script>
<style lang="scss">
.customerBorder {
width: 100%;
border: 1rpx solid lightgray;
border-radius: 5rpx;
padding: 15rpx;
}
</style>
<style>
</style>

5
src/pages/count/job/countLightDetail.vue

@ -391,6 +391,8 @@
selectItem.handleQty = Number(qty) selectItem.handleQty = Number(qty)
selectItem.packQty = pack.packQty selectItem.packQty = pack.packQty
selectItem.packUnit = pack.packUnit selectItem.packUnit = pack.packUnit
selectItem.locationCode =this.fromLocationCode
selectItem.fromLocationCode =this.fromLocationCode
this.$refs.countQtyEdit.openEditPopupShowSeconds(selectItem, this.$refs.countQtyEdit.openEditPopupShowSeconds(selectItem,
null); null);
@ -463,6 +465,7 @@
countQty: 0, countQty: 0,
balanceQty: Number(qty), balanceQty: Number(qty),
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
locationCode:this.fromLocationCode,
creator: this.$store.state.user.id, creator: this.$store.state.user.id,
countTime: new Date() countTime: new Date()
} }
@ -490,6 +493,8 @@
if (!item.scaned) { if (!item.scaned) {
item.scaned = true; item.scaned = true;
item.handleQty = 0 item.handleQty = 0
item.locationCode =this.fromLocationCode
item.fromLocationCode =this.fromLocationCode
} }
}) })
this.submitJob(); this.submitJob();

5
src/pages/index/index.vue

@ -78,6 +78,11 @@
getBusinessType getBusinessType
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
overPagePrint,
overPageTemplate
} from '@/common/config.js';
export default { export default {
components: {}, components: {},
data() { data() {

39
src/pages/issue/job/issueJob.vue

@ -9,7 +9,8 @@
<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 :right-options="item.status=='2'?detailGiveupOptions:detailOptions" <uni-swipe-action-item
:right-options="item.status=='2'?detailGiveupOptions:item.status=='1'?detailCloseOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-issue-job-card :dataContent="item" @click='openJobDetail(item)'></com-issue-job-card> <com-issue-job-card :dataContent="item" @click='openJobDetail(item)'></com-issue-job-card>
@ -34,7 +35,8 @@
import { import {
cancleTakeIssueJob, cancleTakeIssueJob,
getIssueJobList, getIssueJobList,
getIssueJobByProductionline getIssueJobByProductionline,
closeTakeIssueJob
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
@ -43,7 +45,8 @@
import { import {
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption,
getDetailCloseOption
} from '@/common/array.js'; } from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@ -81,6 +84,7 @@
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
productionlineList: [], productionlineList: [],
detailCloseOptions: [],
title:'', title:'',
productionLine:"", productionLine:"",
fromLocation:"" fromLocation:""
@ -97,6 +101,7 @@
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
this.detailCloseOptions = getDetailCloseOption();
}, },
onReachBottom() { onReachBottom() {
// //
@ -294,6 +299,13 @@
this.cancleJob(dataContent.masterId); this.cancleJob(dataContent.masterId);
} }
}); });
}else if (e.content.text == "关闭") {
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
res => {
if (res) {
this.closeJob(dataContent.masterId);
}
});
} }
}, },
@ -315,6 +327,27 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
closeJob(id) {
uni.showLoading({
title: "加载中....",
mask: true
});
closeTakeIssueJob(id).then(res => {
uni.hideLoading()
if(res.data){
this.getList("refresh")
uni.showToast({
title:"关闭任务成功"
})
}else {
this.showMessage("关闭任务失败")
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;

7
src/pages/login/index.vue

@ -97,6 +97,7 @@
import { import {
getCaptchaImage getCaptchaImage
} from '@/api/request2.js'; } from '@/api/request2.js';
import storage from '@/common/utils/storage'
import { import {
mapState, mapState,
mapMutations mapMutations
@ -124,8 +125,10 @@
// computed: mapState(['forcedLogin', 'hasLogin']), // computed: mapState(['forcedLogin', 'hasLogin']),
mounted() { mounted() {
this.tenantValue = this.tenantArray[0].value this.tenantValue = this.tenantArray[0].value
uni.clearStorageSync() // uni.clearStorageSync()
uni.clearStorage(); // // uni.clearStorage(); //
storage.clearStorage()
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
this.username = "admin" this.username = "admin"
this.password = "win123456"; this.password = "win123456";

13
src/pages/package/record/overPackageRecord.vue

@ -4,6 +4,8 @@
<view class=""> <view class="">
<com-blank-view @goScan='getBusinessType' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='getBusinessType' v-if="detailSource.length==0"></com-blank-view>
</view> </view>
<print ref="printService" @printCode="printCode" @templateCode="templateCode"></print>
<view class="page-wraper" v-if="detailSource.length>0"> <view class="page-wraper" v-if="detailSource.length>0">
<view class="cen_card" style="background-color: #fff; margin:10px 0px 0px 10px;"> <view class="cen_card" style="background-color: #fff; margin:10px 0px 0px 10px;">
<view class="cell_box uni-flex uni-row"> <view class="cell_box uni-flex uni-row">
@ -110,7 +112,7 @@
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue' import packUnit from '@/mycomponents/qty/packUnit.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
import print from '@/mycomponents/print/print.vue'
import { import {
getCurrDateTime getCurrDateTime
@ -128,7 +130,8 @@
packageTarget, packageTarget,
recordComDetailCard, recordComDetailCard,
packUnit, packUnit,
winComScanBalance winComScanBalance,
print
}, },
onLoad(option){ onLoad(option){
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
@ -235,6 +238,12 @@
}, },
getScanResult(result) { getScanResult(result) {
this.setData(result); this.setData(result);
setTimeout(res=>{
this.$res.printService.setDefaultData()
})
}, },
setData(result) { setData(result) {

5
src/pages/productReceipt/job/scrapReceiptJob.vue

@ -20,6 +20,11 @@
onLoad(option){ onLoad(option){
this.title = option.title this.title = option.title
}, },
onShow(){
this.$nextTick(()=>{
this.$refs.productreceiptjob.refresh()
})
},
onReachBottom() { onReachBottom() {
this.$refs.productreceiptjob.onReach(); this.$refs.productreceiptjob.onReach();
}, },

1
src/pages/productRecycle/job/productRecycleJobDetail.vue

@ -273,6 +273,7 @@
}) })
if(itemDetail){ if(itemDetail){
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
// //
if (this.jobContent.allowModifyInventoryStatus == "TRUE") { if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus + this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +

38
src/pages/repleinsh/job/repleinshJob.vue

@ -9,7 +9,7 @@
<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:item.status=='1'?detailCloseOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-repleinsh-job-card :dataContent="item" @click='openJobDetail(item)'></com-repleinsh-job-card> <com-repleinsh-job-card :dataContent="item" @click='openJobDetail(item)'></com-repleinsh-job-card>
</uni-swipe-action-item> </uni-swipe-action-item>
@ -31,7 +31,8 @@
import { import {
getRepleinshJobList, getRepleinshJobList,
cancleTakeRepleinshJob cancleTakeRepleinshJob,
closeTakeRepleinshJob
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -41,7 +42,8 @@
import { import {
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption,
getDetailCloseOption
} from '@/common/array.js'; } from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@ -77,6 +79,7 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
detailCloseOptions: [],
title:'', title:'',
scanMessage:"" scanMessage:""
}; };
@ -92,6 +95,7 @@
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
this.detailCloseOptions = getDetailCloseOption();
}, },
//退 //退
@ -231,6 +235,13 @@
this.cancleJob(dataContent.masterId); this.cancleJob(dataContent.masterId);
} }
}); });
}else if (e.content.text == "关闭") {
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
res => {
if (res) {
this.closeJob(dataContent.masterId);
}
});
} }
}, },
@ -252,6 +263,27 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
closeJob(id) {
uni.showLoading({
title: "加载中....",
mask: true
});
closeTakeRepleinshJob(id).then(res => {
uni.hideLoading()
if(res.data){
this.getList("refresh")
uni.showToast({
title:"关闭任务成功"
})
}else {
this.showMessage("关闭任务失败")
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;

4
src/pages/setter/index.vue

@ -42,6 +42,8 @@
removeToken removeToken
} from '@/common/utils/auth' } from '@/common/utils/auth'
import storage from '@/common/utils/storage'
// #ifdef APP-PLUS // #ifdef APP-PLUS
import { import {
appUpdate appUpdate
@ -109,7 +111,7 @@
}; };
function clearStorage() { function clearStorage() {
uni.clearStorageSync() storage.clearStorage()
removeToken(); removeToken();
}; };

Loading…
Cancel
Save