|
@@ -16,12 +16,6 @@
|
|
|
size="small"
|
|
|
@click="editCustomer">保存数据
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh"
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- v-if="form.id">启用
|
|
|
- </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 50px">
|
|
@@ -31,7 +25,11 @@
|
|
|
<trade-card title="明细信息">
|
|
|
<el-tabs v-model="activeName" type="card">
|
|
|
<el-tab-pane label="销售明细" name="sale_detail">
|
|
|
- <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.contactsList"
|
|
|
+ <avue-crud :option="optionContacts"
|
|
|
+ v-model="formContacts"
|
|
|
+ ref="formContacts"
|
|
|
+ :data="form.orderItemsList"
|
|
|
+ :key="key"
|
|
|
@row-save="rowSave"
|
|
|
@row-update="rowUpdate"
|
|
|
@resetColumn="resetColumnTwo('formContacts','optionContacts','optionContactsBack',269.1)"
|
|
@@ -44,13 +42,14 @@
|
|
|
>{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
- @click="rowDelBox(row,index)">删除
|
|
|
+ @click="rowDelBox(row,index,'orderItemsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="支付明细" name="payment_details">
|
|
|
- <avue-crud :option="optionPaymentDetails" v-model="formContacts" ref="payment_details" :data="form.contactsList"
|
|
|
+ <avue-crud :option="optionPaymentDetails" v-model="formContacts" ref="payment_details"
|
|
|
+ :data="form.paymentRecordsList"
|
|
|
@row-save="rowSave"
|
|
|
@row-update="rowUpdate"
|
|
|
@resetColumn="resetColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',269.2)"
|
|
@@ -63,13 +62,14 @@
|
|
|
>{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
- @click="rowDelBox(row,index)">删除
|
|
|
+ @click="rowDelBox(row,index,'paymentRecordsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="出库记录" name="outbound_records">
|
|
|
- <avue-crud :option="optionOutboundRecords" v-model="formContacts" ref="outbound_records" :data="form.contactsList"
|
|
|
+ <avue-crud :option="optionOutboundRecords" v-model="formContacts" ref="outbound_records"
|
|
|
+ :data="form.outboundRecordsList"
|
|
|
@row-save="rowSave"
|
|
|
@row-update="rowUpdate"
|
|
|
@resetColumn="resetColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',269.3)"
|
|
@@ -94,22 +94,32 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {getDetails, submit} from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
- activeName:"sale_detail",
|
|
|
+ activeName: "sale_detail",
|
|
|
disabled: false,
|
|
|
+ key:0,
|
|
|
form: {
|
|
|
- contactsList: []
|
|
|
+ orderItemsList: [],
|
|
|
+ paymentRecordsList: [],
|
|
|
+ outboundRecordsList: []
|
|
|
},
|
|
|
optionForm: {
|
|
|
menuBtn: false,
|
|
|
span: 8,
|
|
|
column: [{
|
|
|
label: '客户',
|
|
|
- prop: "corpId",
|
|
|
+ prop: "customerId",
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH',
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: " ",
|
|
@@ -117,7 +127,13 @@ export default {
|
|
|
}]
|
|
|
}, {
|
|
|
label: '仓库',
|
|
|
- prop: "accountId",
|
|
|
+ prop: "storageId",
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-sales-part/storageDesc/listAll',
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: " ",
|
|
@@ -125,7 +141,7 @@ export default {
|
|
|
}]
|
|
|
}, {
|
|
|
label: '收货地址',
|
|
|
- prop: "amount",
|
|
|
+ prop: "recAddress",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: " ",
|
|
@@ -133,39 +149,37 @@ export default {
|
|
|
}]
|
|
|
}, {
|
|
|
label: '单据编号',
|
|
|
- prop: "settlementDate",
|
|
|
+ prop: "ordNo",
|
|
|
}, {
|
|
|
label: '来源单号',
|
|
|
- prop: "settlementDate",
|
|
|
- }, {
|
|
|
- label: '业务类型',
|
|
|
- prop: "settlementDate",
|
|
|
+ prop: "srcOrdNo",
|
|
|
}, {
|
|
|
label: '应收类别',
|
|
|
- prop: "settlementDate",
|
|
|
+ prop: "receivableType",
|
|
|
}, {
|
|
|
label: '联系人',
|
|
|
- prop: "settlementDate",
|
|
|
+ prop: "contacts",
|
|
|
}, {
|
|
|
label: '电话',
|
|
|
- prop: "settlementDate",
|
|
|
+ prop: "phone",
|
|
|
}, {
|
|
|
label: '配送方式',
|
|
|
- prop: "settlementDate",
|
|
|
+ prop: "shipType",
|
|
|
}, {
|
|
|
label: '物流公司',
|
|
|
- prop: "settlementDate",
|
|
|
+ prop: "logisticsCorpName"
|
|
|
}, {
|
|
|
label: '备注',
|
|
|
prop: "remarks",
|
|
|
type: 'textarea',
|
|
|
- span: 24,
|
|
|
- minRows: 2
|
|
|
+ span: 16,
|
|
|
+ minRows: 1
|
|
|
}]
|
|
|
},
|
|
|
formContacts: {},
|
|
|
optionContacts: {},
|
|
|
optionContactsBack: {
|
|
|
+ border: true,
|
|
|
align: 'center',
|
|
|
index: true,
|
|
|
addBtnText: "录入明细",
|
|
@@ -173,7 +187,7 @@ export default {
|
|
|
dialogDrag: true,
|
|
|
addBtn: false,
|
|
|
span: 8,
|
|
|
- height: 600,
|
|
|
+ height: 500,
|
|
|
addRowBtn: true,
|
|
|
editBtn: false,
|
|
|
delBtn: false,
|
|
@@ -182,64 +196,79 @@ export default {
|
|
|
dialogWidth: "80%",
|
|
|
column: [{
|
|
|
label: '物料编码',
|
|
|
- prop: 'attn',
|
|
|
+ prop: 'goodsNo',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '商品名称',
|
|
|
- prop: 'contractNumber',
|
|
|
+ prop: 'goodsId',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '品牌',
|
|
|
- prop: 'accountsAmount',
|
|
|
+ prop: 'bandr',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '规格型号',
|
|
|
- prop: 'settlmentAmount',
|
|
|
+ prop: 'propertyName',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '花纹',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'pattern',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '商品描述',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'goodsDescription',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '数量',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'goodsNum',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '单位',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'units',
|
|
|
+ type: "select",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ },
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '价格',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'price',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '发货数量',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'sendNum',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '利润',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'profit',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '小计',
|
|
|
- prop: 'thisAmount',
|
|
|
+ prop: 'subTotalMoney',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '返利',
|
|
|
prop: 'thisAmount',
|
|
|
- cell: true
|
|
|
- }, {
|
|
|
- label: '备注',
|
|
|
- prop: 'remarks',
|
|
|
+ width:100,
|
|
|
cell: true
|
|
|
}]
|
|
|
},
|
|
|
- optionPaymentDetails:{},
|
|
|
- optionPaymentDetailsBack:{
|
|
|
+ optionPaymentDetails: {},
|
|
|
+ optionPaymentDetailsBack: {
|
|
|
align: 'center',
|
|
|
index: true,
|
|
|
addBtnText: "录入明细",
|
|
@@ -248,7 +277,7 @@ export default {
|
|
|
addBtn: false,
|
|
|
span: 8,
|
|
|
height: 600,
|
|
|
- addRowBtn: true,
|
|
|
+ addRowBtn: false,
|
|
|
editBtn: false,
|
|
|
delBtn: false,
|
|
|
menuWidth: 140,
|
|
@@ -256,24 +285,24 @@ export default {
|
|
|
dialogWidth: "80%",
|
|
|
column: [{
|
|
|
label: '支付编号',
|
|
|
- prop: 'attn',
|
|
|
+ prop: 'paymentNumber',
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '金额',
|
|
|
- prop: 'contractNumber',
|
|
|
+ prop: 'amount',
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '类型',
|
|
|
- prop: 'accountsAmount',
|
|
|
+ prop: 'paymentType',
|
|
|
cell: true
|
|
|
}, {
|
|
|
label: '支付时间',
|
|
|
- prop: 'settlmentAmount',
|
|
|
+ prop: 'paymentTime',
|
|
|
cell: true
|
|
|
}]
|
|
|
},
|
|
|
- optionOutboundRecords:{},
|
|
|
- optionOutboundRecordsBack:{
|
|
|
+ optionOutboundRecords: {},
|
|
|
+ optionOutboundRecordsBack: {
|
|
|
align: 'center',
|
|
|
index: true,
|
|
|
addBtnText: "录入明细",
|
|
@@ -282,7 +311,7 @@ export default {
|
|
|
addBtn: false,
|
|
|
span: 8,
|
|
|
height: 600,
|
|
|
- addRowBtn: true,
|
|
|
+ addRowBtn: false,
|
|
|
editBtn: false,
|
|
|
delBtn: false,
|
|
|
menuWidth: 140,
|
|
@@ -312,13 +341,62 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ props: {
|
|
|
+ onLoad: Object,
|
|
|
+ detailData: Object
|
|
|
+ },
|
|
|
async created() {
|
|
|
this.optionContacts = await this.getColumnData(this.getColumnName(269.1), this.optionContactsBack);
|
|
|
this.optionPaymentDetails = await this.getColumnData(this.getColumnName(269.2), this.optionPaymentDetailsBack);
|
|
|
this.optionOutboundRecords = await this.getColumnData(this.getColumnName(269.2), this.optionOutboundRecordsBack);
|
|
|
+ this.key++
|
|
|
+ if (this.onLoad.id && this.detailData.id) {
|
|
|
+ this.refresh(this.onLoad.id, true)
|
|
|
+ } else if (this.onLoad.id) {
|
|
|
+ this.refresh(this.onLoad.id, true)
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- rowDelBox(row, index) {
|
|
|
+ //修改提交触发
|
|
|
+ editCustomer() {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submit({
|
|
|
+ bsType:"XS",
|
|
|
+ ...this.form
|
|
|
+ }).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ loading.close();
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ refresh(id, type) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ })
|
|
|
+ getDetails({id: id}).then(res => {
|
|
|
+ this.form = res.data.data
|
|
|
+ loading.close();
|
|
|
+ }).catch(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ rowDelBox(row, index,type) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -330,7 +408,7 @@ export default {
|
|
|
// this.$message.success("操作成功!");
|
|
|
// });
|
|
|
} else {
|
|
|
- this.form.contactsList.splice(index, 1);
|
|
|
+ this.form[type].splice(index, 1);
|
|
|
this.$message.success("操作成功!");
|
|
|
}
|
|
|
}
|