|
|
@@ -45,30 +45,19 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="12">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="退货单">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- :disabled="!!saleOrderData.id"
|
|
|
- v-model="form.sourceNo"
|
|
|
- @click.native="handleReturnGoodsBtn"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="客户名称" prop="contactName">
|
|
|
<el-input v-model="form.contactName" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <el-row :gutter="12">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="客户联系人" prop="linkName">
|
|
|
<el-input clearable v-model="form.linkName" placeholder="请输入" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="12">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="客户电话" prop="linkPhone">
|
|
|
<el-input clearable v-model="form.linkPhone" placeholder="请输入" />
|
|
|
@@ -95,9 +84,6 @@
|
|
|
style="width: 100%"
|
|
|
clearable
|
|
|
multiple
|
|
|
- filterable
|
|
|
- allow-create
|
|
|
- default-first-option
|
|
|
>
|
|
|
<el-option
|
|
|
:label="item.trakNumber"
|
|
|
@@ -118,61 +104,17 @@
|
|
|
<el-input clearable v-model="form.printNo" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12" style="height: 40px">
|
|
|
- <el-form-item label="送货方式" prop="deliveryTypeId">
|
|
|
- <DictSelection
|
|
|
- dictName="送货方式"
|
|
|
- clearable
|
|
|
- v-model="form.deliveryTypeId"
|
|
|
- filterable
|
|
|
- allow-create
|
|
|
- default-first-option
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- </DictSelection>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="回执要求" prop="receiptRequirementTypeId">
|
|
|
- <el-radio-group v-model="form.receiptRequirementTypeId">
|
|
|
- <el-radio
|
|
|
- v-for="item in receiptRequirementTypeOption"
|
|
|
- :key="item.value"
|
|
|
- :label="item.value"
|
|
|
- >{{ item.label }}</el-radio
|
|
|
- >
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="sendFiles" label="发货附件">
|
|
|
<fileMain v-model="form.sendFiles"></fileMain>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="repliedFiles" label="回执附件">
|
|
|
<fileMain v-model="form.repliedFiles"></fileMain>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item prop="makerName" label="制单人" v-if="form.makerName">
|
|
|
- <el-input disabled v-model="form.makerName" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <!-- <el-form-item prop="productionRequirements" label="生产要求">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="form.productionRequirements"
|
|
|
- placeholder=""
|
|
|
- type="textarea"
|
|
|
- disabled
|
|
|
- />
|
|
|
- </el-form-item> -->
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
|
|
|
@@ -187,8 +129,6 @@
|
|
|
:needProduce="saleOrderValue.needProduce"
|
|
|
:typeIds="saleOrderValue.typedetailIds"
|
|
|
:isTotalCount="isTotalCount"
|
|
|
- :oldProductList="oldProductList"
|
|
|
- :sourceType="form.sourceType"
|
|
|
></inventoryTable>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="托盘清单" name="second">
|
|
|
@@ -247,32 +187,27 @@
|
|
|
ref="processSubmitDialogRef"
|
|
|
@reload="reload"
|
|
|
></process-submit-dialog>
|
|
|
- <!-- 退货单 -->
|
|
|
- <return-order-dialog
|
|
|
- :returnOrderDialogFlag.sync="returnOrderDialogFlag"
|
|
|
- v-if="returnOrderDialogFlag"
|
|
|
- returnSourceType=""
|
|
|
- hasHandleReceipt=""
|
|
|
- types=""
|
|
|
- @changeParent="getSReturnOrderInfo"
|
|
|
- ref="returnOrderDialogRef"
|
|
|
- >
|
|
|
- </return-order-dialog>
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { treeClassifyCodeEnum } from '@/enum/dict';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import parentList from '@/views/saleManage/contact/components/parentList.vue';
|
|
|
- import { getSaleOrderDetails } from '@/api/saleManage/saleorder';
|
|
|
+ import {
|
|
|
+ getSaleOrderDetail,
|
|
|
+ getSaleOrderDetails
|
|
|
+ } from '@/api/saleManage/saleorder';
|
|
|
import taskInfoTable from './taskInfoTable.vue';
|
|
|
import {
|
|
|
addSendInformation,
|
|
|
UpdateSendInformation,
|
|
|
- getSendSaleOrderrecordDetailSplit
|
|
|
+ getSendSaleOrderrecordDetailSplit,
|
|
|
+ submit
|
|
|
} from '@/api/saleManage/saleordersendrecord';
|
|
|
import { getPSaleEntrustedReceiveDetailAPI } from '@/api/saleManage/entrustedReceive';
|
|
|
+ import { getcontactlink } from '@/api/saleManage/businessFollow';
|
|
|
import inventoryTable from './inventoryTable.vue';
|
|
|
import replaceTable from './replaceTable.vue';
|
|
|
import stowageTable from './stowageTable.vue';
|
|
|
@@ -287,9 +222,6 @@
|
|
|
import { carBookPageListAPI } from '@/api/transportManager/carBook';
|
|
|
import { projectsGetByIdAPI } from '@/api/pro';
|
|
|
import { parameterGetByCode } from '@/api/main/index.js';
|
|
|
- import { getWarehouseListByIds } from '@/api/purchasingManage/returnGoods';
|
|
|
- import returnOrderDialog from '@/views/saleManage/saleOrder/customerReturnOrder/returnOrderDialog.vue';
|
|
|
- import { getReturnSaleOrderrecordDetail } from '@/api/saleManage/returnGoods';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
@@ -305,8 +237,7 @@
|
|
|
parentList,
|
|
|
entrustedReceiveDialog,
|
|
|
stowageTable,
|
|
|
- replaceTable,
|
|
|
- returnOrderDialog
|
|
|
+ replaceTable
|
|
|
},
|
|
|
|
|
|
//客户管理数据
|
|
|
@@ -322,11 +253,6 @@
|
|
|
default: () => {
|
|
|
return {};
|
|
|
}
|
|
|
- },
|
|
|
- // 是否是退货单创建发货单
|
|
|
- isReturnGoodsCreate: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -351,12 +277,7 @@
|
|
|
orderId: '',
|
|
|
replied: 0,
|
|
|
trayNum: '',
|
|
|
- replaceList: [],
|
|
|
- deliveryTypeId: '',
|
|
|
- receiptRequirementTypeId: 2,
|
|
|
- sourceType: '', // 1 销售订单 2 受托收货单 3 退货单
|
|
|
- sourceId: '',
|
|
|
- sourceNo: ''
|
|
|
+ replaceList: []
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
@@ -366,7 +287,6 @@
|
|
|
payWayOptions: [],
|
|
|
delDetailIds: [],
|
|
|
carList: [],
|
|
|
- oldProductList: [],
|
|
|
visible: false,
|
|
|
entrustedReceiveDialogFlag: false,
|
|
|
processSubmitDialogFlag: false,
|
|
|
@@ -374,65 +294,34 @@
|
|
|
activeName: 'first',
|
|
|
formDef,
|
|
|
form: copyObj(formDef),
|
|
|
- returnOrderDialogFlag: false,
|
|
|
|
|
|
- // 提交状态
|
|
|
- loading: false,
|
|
|
- // 是否是修改
|
|
|
- isUpdate: false,
|
|
|
- businessId: '',
|
|
|
- isTotalCount: 0,
|
|
|
- receiptRequirementTypeOption: [
|
|
|
- {
|
|
|
- label: '签回单',
|
|
|
- value: 1
|
|
|
- },
|
|
|
- {
|
|
|
- label: '不签回单',
|
|
|
- value: 2
|
|
|
- },
|
|
|
- {
|
|
|
- label: '带签收单',
|
|
|
- value: 3
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- allcountAmount() {
|
|
|
- return this.$store.state.order.allcountAmount;
|
|
|
- },
|
|
|
- rules() {
|
|
|
- return {
|
|
|
+ rules: {
|
|
|
partaName: [
|
|
|
{ required: true, message: '请选择客户名称', trigger: 'change' }
|
|
|
],
|
|
|
linkName: [
|
|
|
- {
|
|
|
- required: this.form.needProduce != 2 ? true : false,
|
|
|
- message: '请输入',
|
|
|
- trigger: ['blur', 'change']
|
|
|
- }
|
|
|
- ],
|
|
|
- linkPhone: [
|
|
|
- {
|
|
|
- required: this.form.needProduce != 2 ? true : false,
|
|
|
- message: '请输入',
|
|
|
- trigger: 'change'
|
|
|
- }
|
|
|
+ { required: true, message: '请输入', trigger: ['blur', 'change'] }
|
|
|
],
|
|
|
orderNo: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
|
receiveAddress: [
|
|
|
- {
|
|
|
- required: this.form.needProduce != 2 ? true : false,
|
|
|
- message: '请输入',
|
|
|
- trigger: 'change'
|
|
|
- }
|
|
|
+ { required: true, message: '请输入', trigger: 'change' }
|
|
|
],
|
|
|
deviceName: [
|
|
|
{ required: true, message: '前选择车辆', trigger: 'change' }
|
|
|
]
|
|
|
- };
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交状态
|
|
|
+ loading: false,
|
|
|
+ // 是否是修改
|
|
|
+ isUpdate: false,
|
|
|
+ businessId: '',
|
|
|
+ isTotalCount: 0
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ allcountAmount() {
|
|
|
+ return this.$store.state.order.allcountAmount;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -449,31 +338,20 @@
|
|
|
//选择订单回调
|
|
|
changeOrder(obj) {
|
|
|
this.form = Object.assign({}, this.form, {
|
|
|
- productionRequirements: obj
|
|
|
- .map((item) => item.productionRequirements)
|
|
|
- .toString(),
|
|
|
orderIds: obj.map((item) => item.id).toString(),
|
|
|
- orderNo: obj.map((item) => item.orderNo).toString(),
|
|
|
- // needProduce: obj.map((item) => item.needProduce),
|
|
|
- sourceType: 1
|
|
|
+ orderNo: obj.map((item) => item.orderNo).toString()
|
|
|
});
|
|
|
this.getSaleOrderDetails(obj.map((item) => item.id));
|
|
|
},
|
|
|
|
|
|
- async setData(res, type) {
|
|
|
- let eom_saleOrder_addInvoice = await parameterGetByCode({
|
|
|
- code: 'eom_saleOrder_addInvoice'
|
|
|
- });
|
|
|
-
|
|
|
- console.log('eom_saleOrder_addInvoice', res);
|
|
|
-
|
|
|
+ setData(res, type) {
|
|
|
let data = {
|
|
|
...res[0],
|
|
|
orderIds: res.map((item) => item.id).toString(),
|
|
|
orderNo: res.map((item) => item.orderNo).toString(),
|
|
|
productList: res.map((item) => item.productList).flat(),
|
|
|
typedetailIds: res.map((item) => item.typedetailIds).flat(),
|
|
|
- // needProduce: res.map((item) => item.needProduce),
|
|
|
+
|
|
|
totalAmount: res.reduce(
|
|
|
(sum, obj) =>
|
|
|
sum + ((obj.totalAmount && Number(obj.totalAmount)) || 0),
|
|
|
@@ -498,8 +376,7 @@
|
|
|
};
|
|
|
|
|
|
this.loading = false;
|
|
|
- this.saleOrderValue = JSON.parse(JSON.stringify(data));
|
|
|
- this.oldProductList = JSON.parse(JSON.stringify(data.productList));
|
|
|
+ this.saleOrderValue = data;
|
|
|
this.partbAddress = data.partbAddress;
|
|
|
if (type == 'sendInit') {
|
|
|
return;
|
|
|
@@ -522,9 +399,7 @@
|
|
|
projectId,
|
|
|
projectCode,
|
|
|
totalPrice,
|
|
|
- receiveAddress,
|
|
|
- productionRequirements,
|
|
|
- needProduce
|
|
|
+ receiveAddress
|
|
|
} = data;
|
|
|
if (productList && productList.length > 0) {
|
|
|
productList.forEach((v) => {
|
|
|
@@ -548,28 +423,14 @@
|
|
|
payAmount,
|
|
|
projectName,
|
|
|
projectId,
|
|
|
- projectSn: projectCode,
|
|
|
- productionRequirements,
|
|
|
- needProduce
|
|
|
+ projectSn: projectCode
|
|
|
});
|
|
|
- console.log('form~~~~~~~~~~', this.form);
|
|
|
productList.forEach((item, index) => {
|
|
|
item['tempId'] = index;
|
|
|
item.id = '';
|
|
|
});
|
|
|
- // this.$refs.inventoryTableref &&
|
|
|
- // this.$refs.inventoryTableref.putTableValue(productList);
|
|
|
- this.oldProductList = JSON.parse(JSON.stringify(productList));
|
|
|
- if (eom_saleOrder_addInvoice?.value == 1) {
|
|
|
- this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.putTableValue(productList, true);
|
|
|
- } else {
|
|
|
- this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.$refs.productListRef.open(
|
|
|
- productList
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
+ this.$refs.inventoryTableref &&
|
|
|
+ this.$refs.inventoryTableref.putTableValue(productList);
|
|
|
this.$refs.taskInfoTableRef &&
|
|
|
this.$refs.taskInfoTableRef.putTableValue(trakNoteList);
|
|
|
this.setAddress();
|
|
|
@@ -592,7 +453,6 @@
|
|
|
async getSaleOrderDetails(ids) {
|
|
|
this.loading = true;
|
|
|
let res = await getSaleOrderDetails(ids);
|
|
|
- console.log('res~~~~', res);
|
|
|
if (res?.length) {
|
|
|
this.setData(res);
|
|
|
}
|
|
|
@@ -631,22 +491,17 @@
|
|
|
} else if (data.saleOrder) {
|
|
|
this.setData([data.saleOrder], 'sendInit');
|
|
|
}
|
|
|
- console.log('data~~~~', data);
|
|
|
+
|
|
|
this.loading = false;
|
|
|
if (data) {
|
|
|
this.$nextTick(() => {
|
|
|
- data.productList?.forEach((item) => {
|
|
|
+ data.productList.forEach((item) => {
|
|
|
item['tempId'] = item.id;
|
|
|
});
|
|
|
data.carNo = data.carNo ? data.carNo.split(',') : [];
|
|
|
this.form = data;
|
|
|
- this.form.needProduce = data?.saleOrderList[0]?.needProduce;
|
|
|
- this.form.deliveryTypeId = data.deliveryTypeId + '';
|
|
|
this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.putTableValue(
|
|
|
- data.productList,
|
|
|
- true
|
|
|
- );
|
|
|
+ this.$refs.inventoryTableref.putTableValue(data.productList);
|
|
|
this.$refs.stowageTableRef &&
|
|
|
this.$refs.stowageTableRef.putTableValue(data.carList);
|
|
|
this.$refs.taskInfoTableRef &&
|
|
|
@@ -660,129 +515,6 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- // 选择退货单
|
|
|
- handleReturnGoodsBtn(e) {
|
|
|
- if (e.target.nodeName == 'I') {
|
|
|
- this.form = Object.assign({}, this.form, {
|
|
|
- carNo: [],
|
|
|
- deviceName: '',
|
|
|
- deviceId: '',
|
|
|
- linkName: '',
|
|
|
- linkPhone: '',
|
|
|
- orderNo: '',
|
|
|
- productList: [],
|
|
|
- orderId: '',
|
|
|
- contactId: '',
|
|
|
- contactName: '',
|
|
|
- entrustedCode: '',
|
|
|
- entrustedId: '',
|
|
|
- sendNoteNo: '',
|
|
|
- pricingWay: '',
|
|
|
- sourceNo: '',
|
|
|
- sourceId: '',
|
|
|
- sourceType: ''
|
|
|
- });
|
|
|
- this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.putTableValue([], true);
|
|
|
- return;
|
|
|
- }
|
|
|
- this.returnOrderDialogFlag = true;
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.returnOrderDialogRef.init();
|
|
|
- // });
|
|
|
- },
|
|
|
- // 获取退货单数据
|
|
|
- async getSReturnOrderInfo(row) {
|
|
|
- console.log('row~~~~', row);
|
|
|
- // this.form = Object.assign({}, this.form, {
|
|
|
- // sourceId: row.id,
|
|
|
- // sourceNo: row.returnNo,
|
|
|
- // });
|
|
|
- const data = await getReturnSaleOrderrecordDetail(row.id);
|
|
|
- if (data) {
|
|
|
- this.$nextTick(() => {
|
|
|
- let {
|
|
|
- carNo,
|
|
|
- returnNo,
|
|
|
- id,
|
|
|
- linkName,
|
|
|
- linkPhone,
|
|
|
- orderIds,
|
|
|
- orderNo,
|
|
|
- contactId,
|
|
|
- contactName,
|
|
|
- pricingWay = data?.saleOrder?.pricingWay,
|
|
|
- partaId,
|
|
|
- partaName,
|
|
|
- partaTel,
|
|
|
- partaLinkName,
|
|
|
- partaAddress,
|
|
|
- productList,
|
|
|
- trayList,
|
|
|
- trakNoteList,
|
|
|
- totalAmount,
|
|
|
- payAmount,
|
|
|
- projectName,
|
|
|
- projectId,
|
|
|
- projectCode,
|
|
|
- totalPrice,
|
|
|
- redressProductList,
|
|
|
- receiveAddress
|
|
|
- } = data;
|
|
|
-
|
|
|
- if (redressProductList && redressProductList.length > 0) {
|
|
|
- productList.push(...redressProductList);
|
|
|
- }
|
|
|
-
|
|
|
- if (productList && productList.length > 0) {
|
|
|
- productList.forEach((v) => {
|
|
|
- v.orderTotalCount = v.totalCount;
|
|
|
- v.extField = {};
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- this.form = Object.assign({}, this.form, {
|
|
|
- // contactId,
|
|
|
- // contactName,
|
|
|
- // linkName,
|
|
|
- // linkPhone,
|
|
|
- // orderNo,
|
|
|
- // orderIds: orderIds,
|
|
|
- carNo: carNo ? carNo.split(',') : [],
|
|
|
- pricingWay,
|
|
|
- sourceType: 3,
|
|
|
- sourceNo: returnNo,
|
|
|
- sourceId: id,
|
|
|
- contactId,
|
|
|
- contactName,
|
|
|
- // linkName: partaLinkName,
|
|
|
- // linkPhone: partaTel,
|
|
|
- orderNo,
|
|
|
- orderIds,
|
|
|
- // receiveAddress: receiveAddress || partaAddress,
|
|
|
- productList,
|
|
|
- trakNoteList,
|
|
|
- trayList,
|
|
|
- totalAmount,
|
|
|
- totalPrice,
|
|
|
- payAmount,
|
|
|
- projectName,
|
|
|
- projectId,
|
|
|
- projectSn: projectCode
|
|
|
- });
|
|
|
-
|
|
|
- productList.forEach((item, index) => {
|
|
|
- item['tempId'] = index;
|
|
|
- item.id = '';
|
|
|
- });
|
|
|
-
|
|
|
- this.oldProductList = JSON.parse(JSON.stringify(productList));
|
|
|
-
|
|
|
- this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.putTableValue(productList, true);
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
//选择受托收货单弹框
|
|
|
handleEntrustedReceive(e) {
|
|
|
if (e.target.nodeName == 'I') {
|
|
|
@@ -793,20 +525,16 @@
|
|
|
linkName: '',
|
|
|
linkPhone: '',
|
|
|
orderNo: '',
|
|
|
- productList: [],
|
|
|
orderId: '',
|
|
|
contactId: '',
|
|
|
contactName: '',
|
|
|
entrustedCode: '',
|
|
|
entrustedId: '',
|
|
|
sendNoteNo: '',
|
|
|
- pricingWay: '',
|
|
|
- sourceNo: '',
|
|
|
- sourceId: '',
|
|
|
- sourceType: ''
|
|
|
+ pricingWay: ''
|
|
|
});
|
|
|
this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.putTableValue([], true);
|
|
|
+ this.$refs.inventoryTableref.putTableValue([]);
|
|
|
return;
|
|
|
}
|
|
|
this.searchParams = {
|
|
|
@@ -829,17 +557,17 @@
|
|
|
linkPhone,
|
|
|
orderId,
|
|
|
orderNo,
|
|
|
- // productList,
|
|
|
+ productList,
|
|
|
contactId,
|
|
|
contactName,
|
|
|
pricingWay = data?.saleOrder?.pricingWay
|
|
|
} = data;
|
|
|
- // if (productList && productList.length > 0) {
|
|
|
- // productList.forEach((v) => {
|
|
|
- // v.orderTotalCount = v.orderTotalCount || v.totalCount;
|
|
|
- // v.extField = {};
|
|
|
- // });
|
|
|
- // }
|
|
|
+ if (productList && productList.length > 0) {
|
|
|
+ productList.forEach((v) => {
|
|
|
+ v.orderTotalCount = v.orderTotalCount || v.totalCount;
|
|
|
+ v.extField = {};
|
|
|
+ });
|
|
|
+ }
|
|
|
this.form = Object.assign({}, this.form, {
|
|
|
contactId,
|
|
|
contactName,
|
|
|
@@ -847,20 +575,18 @@
|
|
|
linkPhone,
|
|
|
orderNo,
|
|
|
orderIds: orderId,
|
|
|
- // productList,
|
|
|
+ productList,
|
|
|
carNo: carNo ? carNo.split(',') : [],
|
|
|
pricingWay,
|
|
|
entrustedCode: code,
|
|
|
- entrustedId: id,
|
|
|
- sourceType: 2
|
|
|
+ entrustedId: id
|
|
|
+ });
|
|
|
+ productList.forEach((item, index) => {
|
|
|
+ item.id = '';
|
|
|
+ item['tempId'] = index;
|
|
|
});
|
|
|
- this.getSaleOrderDetails([orderId]);
|
|
|
- // productList.forEach((item, index) => {
|
|
|
- // item.id = '';
|
|
|
- // item['tempId'] = index;
|
|
|
- // });
|
|
|
- // this.$refs.inventoryTableref &&
|
|
|
- // this.$refs.inventoryTableref.putTableValue(productList, code);
|
|
|
+ this.$refs.inventoryTableref &&
|
|
|
+ this.$refs.inventoryTableref.putTableValue(productList, code);
|
|
|
});
|
|
|
},
|
|
|
//替代料
|
|
|
@@ -883,11 +609,7 @@
|
|
|
orderId: '',
|
|
|
pricingWay: '',
|
|
|
entrustedCode: '',
|
|
|
- entrustedId: '',
|
|
|
- productionRequirements: '',
|
|
|
- sourceType: '',
|
|
|
- sourceNo: '',
|
|
|
- sourceId: ''
|
|
|
+ entrustedId: ''
|
|
|
});
|
|
|
this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.putTableValue([]);
|
|
|
@@ -901,10 +623,9 @@
|
|
|
|
|
|
//打开新增编辑弹框
|
|
|
async open(type, row, orderId) {
|
|
|
- this.visible = true;
|
|
|
-
|
|
|
this.title = type === 'add' ? '新增发货单' : '修改';
|
|
|
this.parameterGetByCode();
|
|
|
+ this.visible = true;
|
|
|
this.carList = await carBookPageListAPI({ pageNum: 1, size: 100 });
|
|
|
|
|
|
if (orderId) {
|
|
|
@@ -917,10 +638,6 @@
|
|
|
await this.getSendSaleOrderDetail(row?.id);
|
|
|
}
|
|
|
|
|
|
- if (this.isReturnGoodsCreate && type == 'add') {
|
|
|
- this.getSReturnOrderInfo(row);
|
|
|
- }
|
|
|
-
|
|
|
if (type == 'add') {
|
|
|
this.isUpdate = false;
|
|
|
} else {
|
|
|
@@ -949,7 +666,7 @@
|
|
|
});
|
|
|
}),
|
|
|
new Promise((resolve, reject) => {
|
|
|
- this.$refs.inventoryTableref.validateFormOptimized((valid) => {
|
|
|
+ this.$refs.inventoryTableref.validateForm((valid) => {
|
|
|
if (!valid) {
|
|
|
reject(false);
|
|
|
} else {
|
|
|
@@ -1001,13 +718,6 @@
|
|
|
) {
|
|
|
item['isReplace'] = 1;
|
|
|
}
|
|
|
-
|
|
|
- if (item.isSuspend == 1) {
|
|
|
- item.offsetDetail[0]['reverseQuantity'] = item.saleCount;
|
|
|
- item['reverseQuantity'] = item.saleCount;
|
|
|
- } else {
|
|
|
- item['reverseQuantity'] = 0;
|
|
|
- }
|
|
|
});
|
|
|
|
|
|
let commitData = Object.assign({}, this.form, {
|
|
|
@@ -1055,23 +765,14 @@
|
|
|
}
|
|
|
},
|
|
|
async sendSubmit(res) {
|
|
|
- console.log('res~~~~~~', res, this.businessId);
|
|
|
- let paramsId = this.isReturnGoodsCreate ? res : this.businessId || res;
|
|
|
- console.log('paramsId~~~', paramsId);
|
|
|
- const data = await getSendSaleOrderrecordDetailSplit(paramsId);
|
|
|
- let storemanIds = '';
|
|
|
- console.log('data~~~~~~', data);
|
|
|
- let ids = data.productList.map((item) => item.warehouseId);
|
|
|
- if (ids?.length) {
|
|
|
- let warehouseList = await getWarehouseListByIds(ids || []);
|
|
|
- storemanIds = warehouseList.map((item) => item.ownerId);
|
|
|
- }
|
|
|
-
|
|
|
+ const data = await getSendSaleOrderrecordDetailSplit(
|
|
|
+ this.businessId || res
|
|
|
+ );
|
|
|
this.processSubmitDialogFlag = true;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
let params = {
|
|
|
- businessId: paramsId,
|
|
|
+ businessId: this.businessId || res,
|
|
|
businessKey:
|
|
|
data.saleTypeName.indexOf('技改') != '-1'
|
|
|
? 'sele_order_send_correction'
|
|
|
@@ -1086,8 +787,7 @@
|
|
|
variables: {
|
|
|
businessCode: data.docNo,
|
|
|
businessName: data.contactName,
|
|
|
- storemanIds: storemanIds.toString(),
|
|
|
- businessType: data.sourceType == 3 ? '退货发货单' : '销售发货单'
|
|
|
+ businessType: '销售发货单'
|
|
|
}
|
|
|
};
|
|
|
|