|
@@ -23,7 +23,7 @@
|
|
|
<a-descriptions-item label="退货原因">{{ detailsData&&detailsData.returnReason || '--' }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="补充说明" :span="3">{{ detailsData&&detailsData.explainInfo || '--' }}</a-descriptions-item>
|
|
|
<a-descriptions-item label="附件" :span="3">
|
|
|
- <span v-if="detailsData&&detailsData.attachmentList">
|
|
|
+ <span v-if="detailsData&&detailsData.attachmentList&&detailsData.attachmentList.length>0">
|
|
|
<a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailsData.attachmentList" :key="item.id">
|
|
|
{{ item.fileName }}
|
|
|
</a>
|
|
@@ -37,7 +37,7 @@
|
|
|
<a-card size="small" :bordered="false" class="salesReturnEdit-cont">
|
|
|
<!-- <div>已入库产品信息</div>
|
|
|
<a-divider /> -->
|
|
|
- <queryPart ref="partQuery" :newLoading="isInster" @add="saveProduct"></queryPart>
|
|
|
+ <queryPart ref="partQuery" :newLoading="isInster" @add="saveProduct" @bachAdd="saveMoreProduct"></queryPart>
|
|
|
</a-card>
|
|
|
<a-card size="small" :bordered="false" class="salesReturnEdit-cont">
|
|
|
<a-alert style="margin-bottom: 10px;" type="info">
|
|
@@ -91,7 +91,7 @@
|
|
|
:max="record.currentStockQty"
|
|
|
placeholder="请输入"
|
|
|
style="width: 100%;"
|
|
|
- @blur="e => onCellBlur(e.target.value, record, 'qty')"
|
|
|
+ @blur="e => onCellBlur(e.target.value, record)"
|
|
|
/>
|
|
|
</template>
|
|
|
|
|
@@ -120,8 +120,6 @@
|
|
|
</div>
|
|
|
<!-- 选择审核人员 -->
|
|
|
<chooseDepartUserModal ref="chooseDepart" :openModal="openDepartUserModal" @close="openDepartUserModal = false" @submit="handleSubmit"></chooseDepartUserModal>
|
|
|
- <!-- 导入产品 -->
|
|
|
- <!-- <importGuideModal :openModal="openGuideModal" :params="{salesReturnBillSn: $route.params.sn}" @close="closeGuideModel" @ok="hanldeOk" /> -->
|
|
|
<!-- 批量设置退货原因 -->
|
|
|
<commonModal modalTit="批量设置退货原因" :openModal="showPlModal" @cancel="showPlModal = false" @ok="setPlReturnReason">
|
|
|
<div style="text-align: center;">
|
|
@@ -147,12 +145,8 @@ import commonModal from '@/views/common/commonModal.vue'
|
|
|
import EditableCell from '@/views/common/editInput.js'
|
|
|
import chooseDepartUserModal from './chooseDepartUserModal.vue'
|
|
|
import returnReason from '@/views/common/returnReason'
|
|
|
-import { salesReturnDetail, salesReturnSubmit, salesReturnBatchInsert, salesReturnPrint, salesReturnExport } from '@/api/salesReturn'
|
|
|
+import { salesReturnDetail, salesReturnBatchInsert, salesReturnPrint, salesReturnExport } from '@/api/salesReturn'
|
|
|
import {
|
|
|
- salesReturnDetailList,
|
|
|
- salesReturnDetailDel,
|
|
|
- salesReturnDetailInsert,
|
|
|
- salesReturnDetailUpdateQty,
|
|
|
salesReturnDetailUpdateReason,
|
|
|
salesReturnDetailSetReason
|
|
|
} from '@/api/salesReturnDetail'
|
|
@@ -265,7 +259,7 @@ export default {
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
- this.productForm.sn = this.$route.query.returnSn
|
|
|
+ this.productForm.sparePartsReturnSn = this.$route.query.returnSn
|
|
|
return sparePartsReturnQueryPage(Object.assign(parameter, this.productForm)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
@@ -273,12 +267,8 @@ export default {
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
- // data.list[i].qtyBackups = data.list[i].initialQty
|
|
|
- // data.list[i].returnReasonBackups = data.list[i].returnReason
|
|
|
}
|
|
|
this.disabled = false
|
|
|
- // this.chooseLoadData = data.list
|
|
|
- // this.total = res.data.count
|
|
|
}
|
|
|
return data
|
|
|
})
|
|
@@ -388,7 +378,7 @@ export default {
|
|
|
onOk () {
|
|
|
_this.delLoading = true
|
|
|
_this.spinning = true
|
|
|
- sparePartsReturnDetailDelete({ detailSn: row.id }).then(res => {
|
|
|
+ sparePartsReturnDetailDelete({ detailSn: row.sparePartsReturnDetailSn }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.resetTable(false)
|
|
|
}
|
|
@@ -408,13 +398,27 @@ export default {
|
|
|
this.productForm.productName = ''
|
|
|
this.productForm.productCode = ''
|
|
|
this.$refs.table.refresh(!!flag)
|
|
|
- // this.getOrderDetail()
|
|
|
+ this.$refs.partQuery.resetSearchForm()
|
|
|
},
|
|
|
// 已选产品 blur
|
|
|
- onCellBlur (val, record, type) {
|
|
|
+ onCellBlur (val, record) {
|
|
|
const ajax_data = {
|
|
|
- id: record.id,
|
|
|
- qty: val
|
|
|
+ sparePartsReturnSn: this.sparePartsReturnSn,
|
|
|
+ sparePartsReturnNo: this.sparePartsReturnNo,
|
|
|
+ sparePartsDetailSn: record.sparePartsDetailSn,
|
|
|
+ productSn: record.productSn,
|
|
|
+ sparePartsReturnDetailSn: record.sparePartsReturnDetailSn,
|
|
|
+ stockDetailSn: record.stockDetailSn,
|
|
|
+ productCode: record.productCode,
|
|
|
+ putQty: record.putQty, // 入库数量
|
|
|
+ returnedQty: record.returnedQty, // 已退数量
|
|
|
+ qty: val, // 申退数量
|
|
|
+ cost: record.cost, // 成本
|
|
|
+ stockBatchNo: record.stockBatchNo, // 批次号
|
|
|
+ warehouseSn: record.warehouseSn, // 仓库sn
|
|
|
+ warehouseLocationSn: record.warehouseLocationSn, // 仓位sn
|
|
|
+ sparePartsNo: record.sparePartsNo,
|
|
|
+ sparePartsSn: record.sparePartsSn
|
|
|
}
|
|
|
this.saveEdit(ajax_data)
|
|
|
},
|
|
@@ -430,6 +434,7 @@ export default {
|
|
|
sparePartsReturnNo: this.sparePartsReturnNo,
|
|
|
sparePartsDetailSn: row.sparePartsDetailSn,
|
|
|
productSn: row.productSn,
|
|
|
+ stockDetailSn: row.stockDetailSn,
|
|
|
productCode: row.productCode,
|
|
|
putQty: row.productQty, // 入库数量
|
|
|
returnedQty: row.returnedQty, // 已退数量
|
|
@@ -444,11 +449,34 @@ export default {
|
|
|
this.spinning = true
|
|
|
this.saveEdit(paramsData)
|
|
|
},
|
|
|
+ saveMoreProduct (data) {
|
|
|
+ var ajax_data = []
|
|
|
+ data.forEach(item => {
|
|
|
+ const obj = {
|
|
|
+ sparePartsReturnSn: this.sparePartsReturnSn,
|
|
|
+ sparePartsReturnNo: this.sparePartsReturnNo,
|
|
|
+ sparePartsDetailSn: item.sparePartsDetailSn,
|
|
|
+ productSn: item.productSn,
|
|
|
+ stockDetailSn: item.stockDetailSn,
|
|
|
+ productCode: item.productCode,
|
|
|
+ putQty: item.productQty, // 入库数量
|
|
|
+ returnedQty: item.returnedQty, // 已退数量
|
|
|
+ qty: item.qty, // 申退数量
|
|
|
+ cost: item.productCost, // 成本
|
|
|
+ stockBatchNo: item.sparePartsBatchNo, // 批次号
|
|
|
+ warehouseSn: item.warehouseSn, // 仓库sn
|
|
|
+ warehouseLocationSn: item.warehouseLocationSn, // 仓位sn
|
|
|
+ sparePartsNo: item.sparePartsNo,
|
|
|
+ sparePartsSn: item.sparePartsSn
|
|
|
+ }
|
|
|
+ ajax_data.push(obj)
|
|
|
+ })
|
|
|
+ this.saveEdit(ajax_data)
|
|
|
+ },
|
|
|
saveEdit (params) {
|
|
|
sparePartsReturnDetailSave(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.resetSearchForm(true)
|
|
|
- // this.$message.success(res.message)
|
|
|
}
|
|
|
this.isInster = false
|
|
|
this.spinning = false
|