Browse Source

修改拒收功能2024/6/26 10:33:28

hella_vue3
zhang_li 3 months ago
parent
commit
eff81553fe
  1. 2
      src/api/request2.js
  2. 38
      src/common/balance.js
  3. 18
      src/mycomponents/balance/balance.vue
  4. 6
      src/mycomponents/balance/balanceSelect.vue
  5. 16
      src/mycomponents/common/comMessage.vue
  6. 12
      src/pages/count/job/countJob.vue
  7. 5
      src/pages/count/record/countRecord.vue
  8. 10
      src/pages/deliver/coms/comScanDeliverPack.vue
  9. 10
      src/pages/deliver/job/deliverJob.vue
  10. 14
      src/pages/purchaseReceipt/job/receiptDetail.vue
  11. 4
      src/pages/unPlanned/record/issueRecord.vue

2
src/api/request2.js

@ -1431,7 +1431,7 @@ export function productDismantleRecordSubmit(params) {
*
*/
export function productDismantleJobClose(params) {
return http.put("/wms/purchasereceipt-job-main/refusal?id="+params)
return http.post("/wms/purchasereceipt-job-main/refusal",params)
}
/**
* 制品发货 任务

38
src/common/balance.js

@ -282,11 +282,7 @@ export function byPacking(label, locationCode, fromInventoryStatuses, callback)
value: locationCode
})
if (fromInventoryStatuses) {
let status = ""
fromInventoryStatuses.forEach(res => {
status = res + ","
})
var status = fromInventoryStatuses.join(',');
filters.push({
column: "inventoryStatus",
action: "in",
@ -350,11 +346,12 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
})
if (fromInventoryStatuses) {
let status = ""
fromInventoryStatuses.forEach(res => {
status = res + ","
})
var status = fromInventoryStatuses.join(',');
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
filters.push({
column: "inventoryStatus",
action: "in",
@ -427,11 +424,12 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
})
if (fromInventoryStatuses) {
var status = ""
fromInventoryStatuses.forEach(res => {
status = res + ","
})
var status = fromInventoryStatuses.join(',');
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
filters.push({
column: "inventoryStatus",
action: "in",
@ -486,10 +484,12 @@ export function byUniqueId(label, locationCode, fromInventoryStatuses, callback)
})
if (fromInventoryStatuses) {
var status = ""
fromInventoryStatuses.forEach(res => {
status = res + ","
})
var status = fromInventoryStatuses.join(',');
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
filters.push({
column: "inventoryStatus",

18
src/mycomponents/balance/balance.vue

@ -8,14 +8,19 @@
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location>
</view>
<view class="uni-flex uni-row u-align-start">
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
<view class="uni-flex" style="flex-direction: column">
<view class="uni-flex uni-row u-align-start">
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> -->
<qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"> </compare-qty>
<qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"> </compare-qty>
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()">
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()">
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view>
</view>
<view class="" v-if="dataContent.inventoryStatus">
<move-status :fromInventoryStatus="dataContent.inventoryStatus"> </move-status>
</view>
</view>
</view>
@ -31,6 +36,7 @@ import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
import moveStatus from '@/mycomponents/balance/moveStatus.vue'
const props = defineProps({
dataContent: {

6
src/mycomponents/balance/balanceSelect.vue

@ -21,7 +21,11 @@
import balance from '@/mycomponents/balance/balance.vue'
const balanceItems = ref([])
const openPopup = (items) => {
balanceItems.value = items;
if(Array.isArray(items)){
balanceItems.value= items;
}else{
balanceItems.value = [items];
}
show.value = true
}

16
src/mycomponents/common/comMessage.vue

@ -57,7 +57,18 @@ const isDisabled = ref(true) // 为 true 时,表示用户可以点击,反之
const seconds = ref(0)
const success = ref(() => {})
const version = ref('')
onMounted(() => {
// onMounted(() => {
// const systemInfo = uni.getSystemInfoSync()
// // #ifdef H5
// version.value = systemInfo.appVersion
// console.log(systemInfo.appVersion, '')
// // #endif
// // #ifdef APP
// version.value = systemInfo.appWgtVersion
// // #endif
// })
const getVersionCode = () => {
const systemInfo = uni.getSystemInfoSync()
// #ifdef H5
version.value = systemInfo.appVersion
@ -67,8 +78,9 @@ onMounted(() => {
// #ifdef APP
version.value = systemInfo.appWgtVersion
// #endif
})
}
const open = () => {
getVersionCode()
show.value = true
isDisabled.value = true
}

12
src/pages/count/job/countJob.vue

@ -118,11 +118,11 @@ const getList = (type) => {
action: 'in',
value: status.value
})
filters.push({
column: 'accept_user_id',
action: '==',
value: store.id
})
// filters.push({
// column: 'accept_user_id',
// action: '==',
// value: store.id
// })
const params = {
filters,
pageNo: pageNo.value,
@ -157,7 +157,7 @@ const getList = (type) => {
})
}
const openJobDetail = (item) => {
proxy.$tab.navigateTo(`./countDetail?id=${item.masterId}&status=${item.status}`)
proxy.$tab.navigateTo(`./countDetail?id=${item.id}&status=${item.status}`)
}
const selectedItem = (item) => {
openJobDetail(item)

5
src/pages/count/record/countRecord.vue

@ -114,9 +114,8 @@ const calcScanCount = (closeScan) => {
const calcHandleQty = () => {
for (const item of detailSource.value) {
item.handleQty = new Decimal(0).toNumber()
item.qty = new Decimal(0).toNumber()
console.log(2323, item.handleQty)
item.handleQty = 0
item.qty = 0
for (const detail of item.subList) {
if (detail != undefined) {
if (detail.scaned) {

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

@ -288,11 +288,17 @@ const afterGetBalance = (label, balance, packageInfo) => {
}
const createBatchInfo = (data, balance, packageInfo) => {
const batch = {
batch: data.lot,
batch: data.lot || data.batch,
qty: 0,
uom: data.uom,
handleQty: Number(data.qty),
Records: []
Records: [],
detail: {
handleQty: Number(data.qty),
packingNumber: data.packingNumber,
qty: 0,
uom: data.uom
}
}
const record = creatRecord(data, balance, packageInfo)
batch.Records.push(record)

10
src/pages/deliver/job/deliverJob.vue

@ -111,11 +111,11 @@ const getList = (type) => {
action: 'in',
value: status.value
})
filters.push({
column: 'accept_user_id',
action: '==',
value: store.id
})
// filters.push({
// column: 'accept_user_id',
// action: '==',
// value: store.id
// })
if (businessType.value && businessType.value.length > 0) {
// :businessType=Deliver businessType=ZZBJDeliver
filters.push({

14
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -11,6 +11,11 @@
<u-switch v-model="isAllReceived" active-color="#5FCB94" inactive-color="#eee" size="35" @change="switchChange"></u-switch>
</view>
</view>
<view class="" v-if="operation == 'reject'">
<uni-section title="拒收原因" type="line">
<uni-easyinput v-model="reasonText" placeholder="请输入拒收原因"></uni-easyinput>
</uni-section>
</view>
</view>
<!-- <required-location ref="locationCompare" title="默认收货库位 :" :locationCode="jobToLocationCode"
:isShowEdit="false"></required-location>
@ -92,6 +97,7 @@ const operation = ref('')
const scanedPackingNumber = ref('')
const status = ref('')
const switchCode = ref('')
const reasonText = ref('')
const comMessageRef = ref()
const locationCompareRef = ref()
const scanPopup = ref()
@ -356,10 +362,18 @@ const commit = () => {
}
const reject = () => {
if (!reasonText.value) {
showMessage('请输入拒收原因')
return
}
comMessageRef.value.showErrorMessage(`是否要拒收任务<br>[${jobContent.value.asnNumber}]?`, (res) => {
console.log(res)
if (res) {
proxy.$modal.loading('提交中....')
const params = {
id: id.value,
refuseReason: reasonText.value
}
productDismantleJobClose(id.value)
.then((res) => {
if (res.data) {

4
src/pages/unPlanned/record/issueRecord.vue

@ -15,7 +15,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" @removeItem="removeItem(index, item)" @updateData="updateData" :isShowLocation="true" @removePack="removePack"> </record-com-detail-card>
<record-com-detail-card :dataContent="item" :index="index" @removeItem="removeItem(index, item)" @updateData="updateData" :isShowLocation="true" @removePack="removePack" :isShowToLocation="false"> </record-com-detail-card>
</view>
<view class="split_line"></view>
</view>
@ -118,7 +118,7 @@ const getDataSource = (result) => {
if (item == undefined) {
const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) //
newDetail.inventoryStatus = 'OK'
// newDetail.inventoryStatus = 'OK'
itemp.subList.push(newDetail)
detailSource.value.push(itemp)
} else {

Loading…
Cancel
Save