Browse Source

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

hella_online_20240823
lijuncheng 5 months ago
parent
commit
5d65e3e03b
  1. 14
      src/common/array.js
  2. 15
      src/mycomponents/record/recordComDetailCard.vue
  3. 13
      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. 16
      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;
}
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() {
let option_detail = [{

15
src/mycomponents/record/recordComDetailCard.vue

@ -30,7 +30,7 @@
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" ></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
@ -52,7 +52,8 @@
getDetailOption,
getDetailEditRemoveOption,
getClearOption,
getEditLocationRemoveOption
getEditLocationRemoveOption,
getRecordOption
} from '@/common/array.js';
export default {
components: {
@ -111,6 +112,14 @@
type: Boolean,
default: false
},
allowModifyQty: {
type: Boolean,
default: false
},
allowModifyLocation: {
type: Boolean,
default: false
}
},
watch: {
@ -148,7 +157,7 @@
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.scanOptions = getRecordOption(this.allowModifyQty,this.allowModifyLocation);
this.removeOptions = this.isShowModifedLocation ?getEditLocationRemoveOption():getClearOption();
},

13
src/mycomponents/scan/winComScanFg.vue

@ -6,10 +6,8 @@
<view class="tab_info">
<view class="conbox">
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000"
style="margin-left: 5px;width: 90%;"
:focus="boxfocus" :placeholder="placeholderValue"
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex"></textarea>
style="margin-left: 5px;width: 90%;" :focus="boxfocus" :placeholder="placeholderValue"
@focus="handleFocus" @input="handelScanMsg" :cursor="cursorIndex"></textarea>
</view>
<view class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex">
@ -125,6 +123,7 @@
this.placeholderValue = '请扫描' + this.placeholder;
},
methods: {
handleFocus() {},
setItemCodeSimulate(itemCode, scanMsg) {
this.itemCode = itemCode;
this.scanMsg = scanMsg;
@ -140,8 +139,8 @@
this.scanMsg = val
},
clearScanValue() {
this.cursorIndex=0,
this.scanMsg = ''
this.cursorIndex = 0,
this.scanMsg = ''
this.getfocus();
},
clickScanMsg() {
@ -188,7 +187,7 @@
// let productDate = content.substr(lengthMat, 8);
// let batch = content.substr(lengthMat + 8, 3);
let order = content.substr(-8);
if(content.length!=lengthBc){
if (content.length != lengthBc) {
that.clear();
throw new Error("解析错误:扫描标签长度与配置条码的长度不一致")
}

7
src/mycomponents/scan/winScanFgLabel.vue

@ -21,8 +21,6 @@
</view>
</view>
</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>
</view>
</template>
@ -54,11 +52,6 @@
},
methods: {
//
simulateScan(item){
this.$refs.comscansimulate.setItemCodeSimulate(item.itemCode,item.copyContent)
this.$refs.comscansimulate.clickScanMsg();
},
openScanPopup(itemCode) {
this.$refs.popup.open('bottom')
setTimeout(res => {

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

@ -296,7 +296,7 @@
},
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">
<scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource">
<comDeliverDetailCard ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'>
<comDeliverDetailCard ref='comIssueDetailCard'
:dataContent="toLocation"
:settingParam="jobContent"
@updateData='updateData'>
</comDeliverDetailCard>
</view>
</scroll-view>

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

@ -10,16 +10,16 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item :right-options="item.scaned?scanOptions:detailOptions"
@click="swipeClick($event,item)">
<recommend :detail="item" :isShowFromLocation="true" :isShowToLocation="true"></recommend>
<recommend :detail="item" :isShowFromLocation="true" :isShowToLocation="true"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<!-- <view class='split_line'></view> -->
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :allowEditQty="allowEditQty" :settingParam="settingParam" @confirm="confirm" :allowEditStatus="true"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
></win-scan-location>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :allowEditQty="allowEditQty" @confirm="confirm"
:allowEditStatus="true"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'></win-scan-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</view>
@ -69,8 +69,8 @@
},
allowEditQty: {
type: Boolean,
default: true
}
default: false
},
},
watch: {
// dataContent: {
@ -84,7 +84,7 @@
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
this.scanOptions = getPurchaseReceiptOption("TRUE", this.settingParam
.allowModifyLocation)
}
},
@ -135,7 +135,7 @@
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode =code;
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
}

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

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

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

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

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

@ -1,5 +1,6 @@
<template>
<view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.Items">
@ -39,7 +40,7 @@
<view v-for="(record,index) in batch.Records">
<uni-swipe-action ref="swipeAction">
<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"
:isShowBatch="batch.packingNumber!=null">
</handle-balance>

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

@ -19,7 +19,11 @@
:productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode">
</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>
<view class="split_line"></view>
</view>

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

@ -37,7 +37,7 @@
<view v-for="(record,index) in batch.Records" :key="index">
<uni-swipe-action ref="swipeAction">
<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"
:isShowBatch="batch.packingNumber!=null">
</handle-balance>

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

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

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

@ -216,6 +216,7 @@
},
autoCommit(){
var that =this
//
let str=""
this.detailSource.forEach((item) => {
@ -236,11 +237,16 @@
str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
this.$throttle(this.commit,2000,this)()
setTimeout(res=>{
that.$throttle(that.commit,2000,that)()
})
}
});
} 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">
<uni-swipe-action ref="swipeAction">
<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" >
<text class="card_packing_code card_content ">外包装</text>
<text class="card_content ">{{record.parentPackingNumber}}</text>
@ -70,7 +70,8 @@
import {
getDetailOption,
getEditRemoveOption
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
@ -107,13 +108,15 @@
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: []
scanOptions: [],
removeOptions:[]
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {

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

@ -293,7 +293,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
},
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">
<uni-swipe-action ref="swipeAction">
<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"
:isShowBatch="batch.packingNumber!=null">
</handle-balance>
@ -65,7 +65,8 @@
import {
getDetailOption,
getEditRemoveOption
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
@ -102,13 +103,15 @@
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: []
scanOptions: [],
removeOptions: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {

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

@ -11,7 +11,12 @@
<view class="page-main">
<scroll-view scroll-y="true" class="">
<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>
</view>
</scroll-view>
@ -183,7 +188,6 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.jobStatus = res.data.status;
that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList)
// that.toLocationCode = that.subList[0].toLocationCode

Loading…
Cancel
Save