|
@@ -184,7 +184,8 @@
|
|
|
<script>
|
|
|
import * as API from '@/api/shengde/productionSystem/purchase/salesReturn'
|
|
|
// import { purchaseContractGetList, purchaseContractDetail } from '@/api/shengde/productionSystem/purchase/contract'
|
|
|
-import { purchaseContractList, purchaseContractDetail } from '@/api/shengde/productionSystem/purchase/contract'
|
|
|
+// import { purchaseContractList, purchaseContractDetail } from '@/api/shengde/productionSystem/purchase/contract'
|
|
|
+import { purchaseReturnList, purchaseReturnDetailList } from '@/api/shengde/productionSystem/purchase/contract'
|
|
|
import LabelTemplate from '@/components/LabelTemplate'
|
|
|
import Utils from '@/util/transit'
|
|
|
import { mapGetters } from 'vuex'
|
|
@@ -218,8 +219,11 @@ export default {
|
|
|
// purchaseContractGetList({}).then((res) => {
|
|
|
// this.contractList = res.data.data.list
|
|
|
// })
|
|
|
- purchaseContractList({ pageNum: 1, pageSize: 9999, type: 1 }).then((res) => {
|
|
|
- this.contractList = res.data.data.records
|
|
|
+ // purchaseContractList({ pageNum: 1, pageSize: 9999, type: 1 }).then((res) => {
|
|
|
+ // this.contractList = res.data.data.records
|
|
|
+ // })
|
|
|
+ purchaseReturnList({ }).then((res) => {
|
|
|
+ this.contractList = res.data.data
|
|
|
})
|
|
|
this.rowData = this.$route.query
|
|
|
},
|
|
@@ -328,9 +332,34 @@ export default {
|
|
|
},
|
|
|
changeContractId(val) {
|
|
|
if (val) {
|
|
|
- purchaseContractDetail({ id: val }).then((res) => {
|
|
|
- if (res.data.data.purchaseContractProductList && res.data.data.purchaseContractProductList.length > 0) {
|
|
|
- this.form.purchaseReturnBomList = res.data.data.purchaseContractProductList.map((item) => {
|
|
|
+ // purchaseContractDetail({ id: val }).then((res) => {
|
|
|
+ // if (res.data.data.purchaseContractProductList && res.data.data.purchaseContractProductList.length > 0) {
|
|
|
+ // this.form.purchaseReturnBomList = res.data.data.purchaseContractProductList.map((item) => {
|
|
|
+ // return {
|
|
|
+ // bomColorCode: item.bomColorCode,
|
|
|
+ // bomColorName: item.bomColorName,
|
|
|
+ // // color: item.color,
|
|
|
+ // // productLong: item.productLong,
|
|
|
+ // // productWide: item.productWide,
|
|
|
+ // // productHigh: item.productHigh,
|
|
|
+ // price: item.price,
|
|
|
+ // recentQuantity: item.quantity,
|
|
|
+ // returnedQuantity: item.returnedQuantity,
|
|
|
+ // surplusQuantity: item.surplusQuantity,
|
|
|
+ // sumPrice: item.sumPrice,
|
|
|
+ // quantity: undefined,
|
|
|
+ // amount: 0,
|
|
|
+ // purchaseContractProductId: item.id,
|
|
|
+ // remark: item.remark,
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // this.form.purchaseReturnBomList = []
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ purchaseReturnDetailList({ id: val }).then((res) => {
|
|
|
+ if (res.data.data && res.data.data.length > 0) {
|
|
|
+ this.form.purchaseReturnBomList = res.data.data.map((item) => {
|
|
|
return {
|
|
|
bomColorCode: item.bomColorCode,
|
|
|
bomColorName: item.bomColorName,
|