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. 32
      src/common/balance.js
  3. 6
      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) { export function productDismantleJobClose(params) {
return http.put("/wms/purchasereceipt-job-main/refusal?id="+params) return http.post("/wms/purchasereceipt-job-main/refusal",params)
} }
/** /**
* 制品发货 任务 * 制品发货 任务

32
src/common/balance.js

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

6
src/mycomponents/balance/balance.vue

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

6
src/mycomponents/balance/balanceSelect.vue

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

16
src/mycomponents/common/comMessage.vue

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

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

@ -118,11 +118,11 @@ const getList = (type) => {
action: 'in', action: 'in',
value: status.value value: status.value
}) })
filters.push({ // filters.push({
column: 'accept_user_id', // column: 'accept_user_id',
action: '==', // action: '==',
value: store.id // value: store.id
}) // })
const params = { const params = {
filters, filters,
pageNo: pageNo.value, pageNo: pageNo.value,
@ -157,7 +157,7 @@ const getList = (type) => {
}) })
} }
const openJobDetail = (item) => { 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) => { const selectedItem = (item) => {
openJobDetail(item) openJobDetail(item)

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

@ -114,9 +114,8 @@ const calcScanCount = (closeScan) => {
const calcHandleQty = () => { const calcHandleQty = () => {
for (const item of detailSource.value) { for (const item of detailSource.value) {
item.handleQty = new Decimal(0).toNumber() item.handleQty = 0
item.qty = new Decimal(0).toNumber() item.qty = 0
console.log(2323, item.handleQty)
for (const detail of item.subList) { for (const detail of item.subList) {
if (detail != undefined) { if (detail != undefined) {
if (detail.scaned) { 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 createBatchInfo = (data, balance, packageInfo) => {
const batch = { const batch = {
batch: data.lot, batch: data.lot || data.batch,
qty: 0, qty: 0,
uom: data.uom, uom: data.uom,
handleQty: Number(data.qty), 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) const record = creatRecord(data, balance, packageInfo)
batch.Records.push(record) batch.Records.push(record)

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

@ -111,11 +111,11 @@ const getList = (type) => {
action: 'in', action: 'in',
value: status.value value: status.value
}) })
filters.push({ // filters.push({
column: 'accept_user_id', // column: 'accept_user_id',
action: '==', // action: '==',
value: store.id // value: store.id
}) // })
if (businessType.value && businessType.value.length > 0) { if (businessType.value && businessType.value.length > 0) {
// :businessType=Deliver businessType=ZZBJDeliver // :businessType=Deliver businessType=ZZBJDeliver
filters.push({ 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> <u-switch v-model="isAllReceived" active-color="#5FCB94" inactive-color="#eee" size="35" @change="switchChange"></u-switch>
</view> </view>
</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> </view>
<!-- <required-location ref="locationCompare" title="默认收货库位 :" :locationCode="jobToLocationCode" <!-- <required-location ref="locationCompare" title="默认收货库位 :" :locationCode="jobToLocationCode"
:isShowEdit="false"></required-location> :isShowEdit="false"></required-location>
@ -92,6 +97,7 @@ const operation = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
const status = ref('') const status = ref('')
const switchCode = ref('') const switchCode = ref('')
const reasonText = ref('')
const comMessageRef = ref() const comMessageRef = ref()
const locationCompareRef = ref() const locationCompareRef = ref()
const scanPopup = ref() const scanPopup = ref()
@ -356,10 +362,18 @@ const commit = () => {
} }
const reject = () => { const reject = () => {
if (!reasonText.value) {
showMessage('请输入拒收原因')
return
}
comMessageRef.value.showErrorMessage(`是否要拒收任务<br>[${jobContent.value.asnNumber}]?`, (res) => { comMessageRef.value.showErrorMessage(`是否要拒收任务<br>[${jobContent.value.asnNumber}]?`, (res) => {
console.log(res) console.log(res)
if (res) { if (res) {
proxy.$modal.loading('提交中....') proxy.$modal.loading('提交中....')
const params = {
id: id.value,
refuseReason: reasonText.value
}
productDismantleJobClose(id.value) productDismantleJobClose(id.value)
.then((res) => { .then((res) => {
if (res.data) { 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="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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>
<view class="split_line"></view> <view class="split_line"></view>
</view> </view>
@ -118,7 +118,7 @@ const getDataSource = (result) => {
if (item == undefined) { if (item == undefined) {
const itemp = createItemInfo(balance, pack) const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) // const newDetail = createDetailInfo(balance, pack) //
newDetail.inventoryStatus = 'OK' // newDetail.inventoryStatus = 'OK'
itemp.subList.push(newDetail) itemp.subList.push(newDetail)
detailSource.value.push(itemp) detailSource.value.push(itemp)
} else { } else {

Loading…
Cancel
Save