Browse Source

修改任务中可以不修改数量,直接不允许修改数量

hella_online_20240823
lijuncheng 5 months ago
parent
commit
5d65e3e03b
  1. 14
      src/common/array.js
  2. 13
      src/mycomponents/record/recordComDetailCard.vue
  3. 7
      src/mycomponents/scan/winComScanFg.vue
  4. 7
      src/mycomponents/scan/winScanFgLabel.vue
  5. 2
      src/pages/deliver/coms/comScanDeliverPack.vue
  6. 5
      src/pages/deliver/job/deliverDetail.vue
  7. 12
      src/pages/inventoryMove/coms/comInventoryDetailCard.vue
  8. 8
      src/pages/inventoryMove/coms/comMoveRecordCard.vue
  9. 2
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  10. 3
      src/pages/issue/coms/comIssueDetailCard.vue
  11. 6
      src/pages/issue/job/issueDetail.vue
  12. 2
      src/pages/package/coms/comOverPackJobDetailCard.vue
  13. 4
      src/pages/package/job/overPackageJobDetail.vue
  14. 10
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  15. 9
      src/pages/repleinsh/coms/comRepleishDetailCard.vue
  16. 2
      src/pages/stockUp/coms/comScanStockUpPack.vue
  17. 9
      src/pages/stockUp/coms/comStockUpDetailCard.vue
  18. 8
      src/pages/stockUp/job/stockUpJobDetail.vue

14
src/common/array.js

@ -110,6 +110,20 @@ export function getPurchaseReceiptOption(allowModifyQty, allowModifyLocation) {
return option; return option;
} }
export function getRecordOption(allowModifyQty, allowModifyLocation) {
var option = []
option.push(...getDetailOption())
if (allowModifyQty) {
option.push(...getEditOption())
}
if (allowModifyLocation) {
option.push(...getLocationOption())
}
option.push(...getRemoveOption())
return option;
}
//详情 //详情
export function getDetailOption() { export function getDetailOption() {
let option_detail = [{ let option_detail = [{

13
src/mycomponents/record/recordComDetailCard.vue

@ -52,7 +52,8 @@
getDetailOption, getDetailOption,
getDetailEditRemoveOption, getDetailEditRemoveOption,
getClearOption, getClearOption,
getEditLocationRemoveOption getEditLocationRemoveOption,
getRecordOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
components: { components: {
@ -111,6 +112,14 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
allowModifyQty: {
type: Boolean,
default: false
},
allowModifyLocation: {
type: Boolean,
default: false
}
}, },
watch: { watch: {
@ -148,7 +157,7 @@
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption(); this.scanOptions = getRecordOption(this.allowModifyQty,this.allowModifyLocation);
this.removeOptions = this.isShowModifedLocation ?getEditLocationRemoveOption():getClearOption(); this.removeOptions = this.isShowModifedLocation ?getEditLocationRemoveOption():getClearOption();
}, },

7
src/mycomponents/scan/winComScanFg.vue

@ -6,10 +6,8 @@
<view class="tab_info"> <view class="tab_info">
<view class="conbox"> <view class="conbox">
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" <textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000"
style="margin-left: 5px;width: 90%;" style="margin-left: 5px;width: 90%;" :focus="boxfocus" :placeholder="placeholderValue"
:focus="boxfocus" :placeholder="placeholderValue" @focus="handleFocus" @input="handelScanMsg" :cursor="cursorIndex"></textarea>
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex"></textarea>
</view> </view>
<view class="uni-flex uni-row space-between u-col-center"> <view class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex"> <view class="uni-flex">
@ -125,6 +123,7 @@
this.placeholderValue = '请扫描' + this.placeholder; this.placeholderValue = '请扫描' + this.placeholder;
}, },
methods: { methods: {
handleFocus() {},
setItemCodeSimulate(itemCode, scanMsg) { setItemCodeSimulate(itemCode, scanMsg) {
this.itemCode = itemCode; this.itemCode = itemCode;
this.scanMsg = scanMsg; this.scanMsg = scanMsg;

7
src/mycomponents/scan/winScanFgLabel.vue

@ -21,8 +21,6 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 模拟扫描功能 -->
<win-com-scan-fg v-show="false" ref="comscansimulate" @getResult="getScanResult" :isShowHistory="false" :clearResult="true"></win-com-scan-fg>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage> <comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view> </view>
</template> </template>
@ -54,11 +52,6 @@
}, },
methods: { methods: {
//
simulateScan(item){
this.$refs.comscansimulate.setItemCodeSimulate(item.itemCode,item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
},
openScanPopup(itemCode) { openScanPopup(itemCode) {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {

2
src/pages/deliver/coms/comScanDeliverPack.vue

@ -296,7 +296,7 @@
}, },
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo); this.afterGetBalance(balance, balance, this.packageInfo);
}, },

5
src/pages/deliver/job/deliverDetail.vue

@ -29,7 +29,10 @@
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource"> <view v-for="(toLocation, index) in detailSource">
<comDeliverDetailCard ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'> <comDeliverDetailCard ref='comIssueDetailCard'
:dataContent="toLocation"
:settingParam="jobContent"
@updateData='updateData'>
</comDeliverDetailCard> </comDeliverDetailCard>
</view> </view>
</scroll-view> </scroll-view>

12
src/pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -17,9 +17,9 @@
<!-- <view class='split_line'></view> --> <!-- <view class='split_line'></view> -->
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
<balance-qty-edit ref="qtyEdit" :allowEditQty="allowEditQty" :settingParam="settingParam" @confirm="confirm" :allowEditStatus="true"></balance-qty-edit> <balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :allowEditQty="allowEditQty" @confirm="confirm"
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' :allowEditStatus="true"></balance-qty-edit>
></win-scan-location> <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'></win-scan-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> <detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage> <comMessage ref="message"></comMessage>
</view> </view>
@ -69,8 +69,8 @@
}, },
allowEditQty: { allowEditQty: {
type: Boolean, type: Boolean,
default: true default: false
} },
}, },
watch: { watch: {
// dataContent: { // dataContent: {
@ -84,7 +84,7 @@
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
} }
if (this.scanOptions.length == 0) { if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam this.scanOptions = getPurchaseReceiptOption("TRUE", this.settingParam
.allowModifyLocation) .allowModifyLocation)
} }
}, },

8
src/pages/inventoryMove/coms/comMoveRecordCard.vue

@ -26,7 +26,9 @@
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
<balanceQtyEdit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="isShowStatus" <balanceQtyEdit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="isShowStatus"
:allowEditStatus="allowEditStatus"> :allowEditStatus="allowEditStatus"
:allowEditQty="allowEditQty"
>
</balanceQtyEdit> </balanceQtyEdit>
<job-detail-popup ref="winHint" :dataContent="showItem"></job-detail-popup> <job-detail-popup ref="winHint" :dataContent="showItem"></job-detail-popup>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -82,6 +84,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
allowEditQty: {
type: Boolean,
default: false
},
}, },
watch: { watch: {

2
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -12,7 +12,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comInventoryDetailCard :allowEditQty="false" :dataContent="item" :settingParam="jobContent" @remove="updateData" <comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData' @openDetail="openDetail"> @updateData='updateData' @openDetail="openDetail">
</comInventoryDetailCard> </comInventoryDetailCard>
</view> </view>

3
src/pages/issue/coms/comIssueDetailCard.vue

@ -1,5 +1,6 @@
<template> <template>
<view> <view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode" <!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> --> :isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.Items"> <view v-for="(item,index) in dataContent.Items">
@ -39,7 +40,7 @@
<view v-for="(record,index) in batch.Records"> <view v-for="(record,index) in batch.Records">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)" <uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="scanOptions"> :right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions">
<handle-balance :detail="record" :isShowLocation="false" <handle-balance :detail="record" :isShowLocation="false"
:isShowBatch="batch.packingNumber!=null"> :isShowBatch="batch.packingNumber!=null">
</handle-balance> </handle-balance>

6
src/pages/issue/job/issueDetail.vue

@ -19,7 +19,11 @@
:productionLineCode="toLocation.productionLineCode" :productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode"> :workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode">
</work-station> --> </work-station> -->
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'> <com-issue-detail-card
ref='comIssueDetailCard'
:dataContent="toLocation"
:settingParam="jobContent"
@updateData='updateData'>
</com-issue-detail-card> </com-issue-detail-card>
<view class="split_line"></view> <view class="split_line"></view>
</view> </view>

2
src/pages/package/coms/comOverPackJobDetailCard.vue

@ -37,7 +37,7 @@
<view v-for="(record,index) in batch.Records" :key="index"> <view v-for="(record,index) in batch.Records" :key="index">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)" <uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="scanOptions"> :right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions">
<handle-balance :detail="record" :isShowLocation="false" <handle-balance :detail="record" :isShowLocation="false"
:isShowBatch="batch.packingNumber!=null"> :isShowBatch="batch.packingNumber!=null">
</handle-balance> </handle-balance>

4
src/pages/package/job/overPackageJobDetail.vue

@ -29,7 +29,9 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource" :key="index"> <view v-for="(toLocation, index) in detailSource" :key="index">
<comOverPackJobDetailCard ref='comOverPackJobDetailCard' :dataContent="toLocation" <comOverPackJobDetailCard ref='comOverPackJobDetailCard' :dataContent="toLocation"
@updateData='updateData'> @updateData='updateData'
:settingParam="jobContent"
>
</comOverPackJobDetailCard> </comOverPackJobDetailCard>
</view> </view>
</scroll-view> </scroll-view>

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

@ -216,6 +216,7 @@
}, },
autoCommit(){ autoCommit(){
var that =this
// //
let str="" let str=""
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
@ -236,11 +237,16 @@
str = '任务明细未全部完成,是否提交?\n'+str str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.$throttle(this.commit,2000,this)() setTimeout(res=>{
that.$throttle(that.commit,2000,that)()
})
} }
}); });
} else { } else {
this.$throttle(this.commit,2000,this)() setTimeout(res=>{
that.$throttle(that.commit,2000,that)()
})
} }
}, },

9
src/pages/repleinsh/coms/comRepleishDetailCard.vue

@ -29,7 +29,7 @@
<view v-for="(record,index) in batch.Records"> <view v-for="(record,index) in batch.Records">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)" <uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="scanOptions"> :right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions">
<!-- <view class="card_view" v-if="record.parentPackingNumber" > <!-- <view class="card_view" v-if="record.parentPackingNumber" >
<text class="card_packing_code card_content ">外包装</text> <text class="card_packing_code card_content ">外包装</text>
<text class="card_content ">{{record.parentPackingNumber}}</text> <text class="card_content ">{{record.parentPackingNumber}}</text>
@ -70,7 +70,8 @@
import { import {
getDetailOption, getDetailOption,
getEditRemoveOption getEditRemoveOption,
getRemoveOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -107,13 +108,15 @@
editItem: {}, editItem: {},
batchItem: {}, batchItem: {},
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: [],
removeOptions:[]
} }
}, },
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption(); this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
}, },
methods: { methods: {

2
src/pages/stockUp/coms/comScanStockUpPack.vue

@ -293,7 +293,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
}, },
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo); this.afterGetBalance(balance, balance, this.packageInfo);
}, },

9
src/pages/stockUp/coms/comStockUpDetailCard.vue

@ -30,7 +30,7 @@
<view v-for="(record,index) in batch.Records" :key="index"> <view v-for="(record,index) in batch.Records" :key="index">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)" <uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="scanOptions"> :right-options="settingParam.allowModifyQty=='TRUE'?scanOptions:removeOptions">
<handle-balance :detail="record" :isShowLocation="false" <handle-balance :detail="record" :isShowLocation="false"
:isShowBatch="batch.packingNumber!=null"> :isShowBatch="batch.packingNumber!=null">
</handle-balance> </handle-balance>
@ -65,7 +65,8 @@
import { import {
getDetailOption, getDetailOption,
getEditRemoveOption getEditRemoveOption,
getRemoveOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -102,13 +103,15 @@
editItem: {}, editItem: {},
batchItem: {}, batchItem: {},
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: [],
removeOptions: []
} }
}, },
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption(); this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
}, },
methods: { methods: {

8
src/pages/stockUp/job/stockUpJobDetail.vue

@ -11,7 +11,12 @@
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource" :key="index"> <view v-for="(toLocation, index) in detailSource" :key="index">
<comStockUpDetailCard ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'> <comStockUpDetailCard
ref='comIssueDetailCard'
:dataContent="toLocation"
@updateData='updateData'
:settingParam="jobContent"
>
</comStockUpDetailCard> </comStockUpDetailCard>
</view> </view>
</scroll-view> </scroll-view>
@ -183,7 +188,6 @@
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.jobStatus = res.data.status; that.jobStatus = res.data.status;
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource = getDataSource(that.detailSource, that.subList)
// that.toLocationCode = that.subList[0].toLocationCode // that.toLocationCode = that.subList[0].toLocationCode

Loading…
Cancel
Save