|
@@ -9,7 +9,9 @@
|
|
<span style="margin: 0 15px;color: #666;" v-if="ordeDetail">
|
|
<span style="margin: 0 15px;color: #666;" v-if="ordeDetail">
|
|
退货仓库:<warehouse
|
|
退货仓库:<warehouse
|
|
style="width:200px;"
|
|
style="width:200px;"
|
|
|
|
+ :allowClear="false"
|
|
v-model="ordeDetail.warehouseSn"
|
|
v-model="ordeDetail.warehouseSn"
|
|
|
|
+ @change="updateWarehouse"
|
|
id="basicInfo-warehouseSn"
|
|
id="basicInfo-warehouseSn"
|
|
placeholder="请选择退货仓库"
|
|
placeholder="请选择退货仓库"
|
|
/>
|
|
/>
|
|
@@ -73,7 +75,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled">查询</a-button>
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled">重置</a-button>
|
|
|
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm(true)" :disabled="disabled">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -170,7 +172,8 @@ import {
|
|
salesReturnSubmit,
|
|
salesReturnSubmit,
|
|
salesReturnBatchInsert,
|
|
salesReturnBatchInsert,
|
|
salesReturnPrint,
|
|
salesReturnPrint,
|
|
- salesReturnExport
|
|
|
|
|
|
+ salesReturnExport,
|
|
|
|
+ salesReturnModify
|
|
} from '@/api/salesReturn'
|
|
} from '@/api/salesReturn'
|
|
import {
|
|
import {
|
|
salesReturnDetailList,
|
|
salesReturnDetailList,
|
|
@@ -304,6 +307,19 @@ export default {
|
|
record.initialQty = valBackups
|
|
record.initialQty = valBackups
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 修改仓库
|
|
|
|
+ updateWarehouse(warehouseSn){
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ const params = {id:this.ordeDetail.id,warehouseSn: warehouseSn}
|
|
|
|
+ salesReturnModify(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.getOrderDetail()
|
|
|
|
+ }
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 修改退货原因
|
|
// 修改退货原因
|
|
updateReason (row) {
|
|
updateReason (row) {
|
|
console.log(row.returnReason)
|
|
console.log(row.returnReason)
|
|
@@ -359,9 +375,12 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 获取单据详细
|
|
// 获取单据详细
|
|
- getOrderDetail () {
|
|
|
|
|
|
+ getOrderDetail (flag) {
|
|
salesReturnDetail({ sn: this.orderSn }).then(res => {
|
|
salesReturnDetail({ sn: this.orderSn }).then(res => {
|
|
this.ordeDetail = res.data || null
|
|
this.ordeDetail = res.data || null
|
|
|
|
+ if(!flag){
|
|
|
|
+ this.$refs.partQuery.pageInit(this.buyerSn, this.ordeDetail.warehouseSn)
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 删除产品
|
|
// 删除产品
|
|
@@ -388,14 +407,14 @@ export default {
|
|
},
|
|
},
|
|
resetTable (flag) {
|
|
resetTable (flag) {
|
|
this.$refs.table.refresh(flag)
|
|
this.$refs.table.refresh(flag)
|
|
- this.getOrderDetail()
|
|
|
|
|
|
+ this.getOrderDetail(true)
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm (flag) {
|
|
resetSearchForm (flag) {
|
|
this.productForm.productName = ''
|
|
this.productForm.productName = ''
|
|
this.productForm.productCode = ''
|
|
this.productForm.productCode = ''
|
|
this.$refs.table.refresh(!!flag)
|
|
this.$refs.table.refresh(!!flag)
|
|
- this.getOrderDetail()
|
|
|
|
|
|
+ this.getOrderDetail(flag)
|
|
},
|
|
},
|
|
// 添加或修改产品
|
|
// 添加或修改产品
|
|
saveProduct (row) {
|
|
saveProduct (row) {
|
|
@@ -484,8 +503,7 @@ export default {
|
|
pageInit () {
|
|
pageInit () {
|
|
this.orderSn = this.$route.params.sn
|
|
this.orderSn = this.$route.params.sn
|
|
this.buyerSn = this.$route.params.buyerSn
|
|
this.buyerSn = this.$route.params.buyerSn
|
|
- this.resetSearchForm(true)
|
|
|
|
- this.$refs.partQuery.pageInit(this.buyerSn, 0)
|
|
|
|
|
|
+ this.resetSearchForm()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|