|
@@ -3,24 +3,16 @@
|
|
|
<div class="customer-head">
|
|
|
<div class="customer-back">
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
- @click="backToList(0)">返回列表
|
|
|
+ @click="backToList(0)">返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
<!-- <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
|
|
|
<!-- @click="confirmEditing">编辑-->
|
|
|
<!-- </el-button>-->
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh"
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- @click="editCustomer">保存数据
|
|
|
+ <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh"
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
- v-if="form.status !== '已发货'"
|
|
|
+ <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.status !== '已发货'"
|
|
|
@click="generateOutbound">生成出库任务
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -32,64 +24,53 @@
|
|
|
<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.orderItemsList"
|
|
|
- :key="key"
|
|
|
- @row-save="rowSave"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @resetColumn="resetColumnTwo('formContacts','optionContacts','optionContactsBack',269.1)"
|
|
|
- @saveColumn="saveColumnTwo('formContacts','optionContacts','optionContactsBack',269.1)">
|
|
|
+ <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)"
|
|
|
+ @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.1)">
|
|
|
+ <template slot-scope="scope" slot="menuLeft">
|
|
|
+ <el-button type="primary" icon="el-icon-printer" size="small"
|
|
|
+ @click="handlePrint">打印</el-button>
|
|
|
+ </template>
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
- <el-button
|
|
|
- :size="size" :disabled="disabled" :type="type"
|
|
|
- :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
|
|
|
- @click="$refs.formContacts.rowEdit(row,index)"
|
|
|
- >编辑
|
|
|
+ <el-button :size="size" :disabled="disabled" :type="type"
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
+ @click="$refs.formContacts.rowEdit(row, index)">编辑
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
- @click="rowDelBox(row,index,'orderItemsList')">删除
|
|
|
+ @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.paymentRecordsList"
|
|
|
- @row-save="rowSave"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @resetColumn="resetColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',269.2)"
|
|
|
- @saveColumn="saveColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',269.2)">
|
|
|
+ :data="form.paymentRecordsList" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
+ @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 269.2)"
|
|
|
+ @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 269.2)">
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
- <el-button
|
|
|
- :size="size" :disabled="disabled" :type="type"
|
|
|
- :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
|
|
|
- @click="$refs.formContacts.rowCell(row,index)"
|
|
|
- >{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
+ <el-button :size="size" :disabled="disabled" :type="type"
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
+ @click="$refs.formContacts.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
- @click="rowDelBox(row,index,'paymentRecordsList')">删除
|
|
|
+ @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.outboundRecordsList"
|
|
|
- @row-save="rowSave"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @resetColumn="resetColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',269.3)"
|
|
|
- @saveColumn="saveColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',269.3)">
|
|
|
+ :data="form.outboundRecordsList" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
+ @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 269.3)"
|
|
|
+ @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 269.3)">
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
- <el-button
|
|
|
- :size="size" :disabled="disabled" :type="type"
|
|
|
- :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
|
|
|
- @click="$refs.formContacts.rowCell(row,index)"
|
|
|
- >{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
+ <el-button :size="size" :disabled="disabled" :type="type"
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
+ @click="$refs.formContacts.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
- @click="rowDelBox(row,index)">删除
|
|
|
+ @click="rowDelBox(row, index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -101,8 +82,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getDetails, submit, generateShipTask, tradingBox} from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
-import {dotList, goodsDetail} from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
|
+import { getDetails, submit, generateShipTask, tradingBox } from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
+import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -236,6 +217,17 @@ export default {
|
|
|
refreshBtn: false,
|
|
|
dialogDrag: true,
|
|
|
addBtn: true,
|
|
|
+ btns: [
|
|
|
+ {
|
|
|
+ text: "录入明细",
|
|
|
+ type: "primary"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "打印",
|
|
|
+ type: "default",
|
|
|
+ click: "handlePrint"
|
|
|
+ }
|
|
|
+ ],
|
|
|
span: 8,
|
|
|
height: 500,
|
|
|
addRowBtn: false,
|
|
@@ -346,13 +338,14 @@ export default {
|
|
|
value: "dot"
|
|
|
},
|
|
|
overHidden: true,
|
|
|
- width: 100
|
|
|
- }, {
|
|
|
- label: '价格',
|
|
|
- prop: 'price',
|
|
|
- overHidden: true,
|
|
|
- width: 100
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '价格',
|
|
|
+ // prop: 'price',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 100
|
|
|
+ // },
|
|
|
+ {
|
|
|
label: '发货数量',
|
|
|
prop: 'sendNum',
|
|
|
overHidden: true,
|
|
@@ -362,29 +355,30 @@ export default {
|
|
|
prop: 'grossProfit',
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
- }
|
|
|
- // , {
|
|
|
- // label: '利润',
|
|
|
- // prop: 'profit',
|
|
|
- // overHidden: true,
|
|
|
- // width: 100
|
|
|
- // }
|
|
|
- , {
|
|
|
- label: '小计',
|
|
|
- prop: 'subTotalMoney',
|
|
|
- overHidden: true,
|
|
|
- width: 100
|
|
|
- }, {
|
|
|
- label: '返利',
|
|
|
- prop: 'thisAmount',
|
|
|
- overHidden: true,
|
|
|
- width: 100
|
|
|
- }, {
|
|
|
- label: '成本',
|
|
|
- prop: 'costprie',
|
|
|
- overHidden: true,
|
|
|
- width: 100
|
|
|
- }]
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '利润',
|
|
|
+ // prop: 'profit',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 100
|
|
|
+ // }
|
|
|
+ // , {
|
|
|
+ // label: '小计',
|
|
|
+ // prop: 'subTotalMoney',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 100
|
|
|
+ // }, {
|
|
|
+ // label: '返利',
|
|
|
+ // prop: 'thisAmount',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 100
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '成本',
|
|
|
+ prop: 'costprie',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100
|
|
|
+ }]
|
|
|
},
|
|
|
optionPaymentDetails: {},
|
|
|
optionPaymentDetailsBack: {
|
|
@@ -457,9 +451,9 @@ export default {
|
|
|
},
|
|
|
async created() {
|
|
|
this.optionContacts = await this.getColumnData(this.getColumnName(269.1), this.optionContactsBack);
|
|
|
- this.findObject(this.optionContacts.column, "goodsId").change = ({value, column}) => {
|
|
|
+ this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
|
|
|
if (this.formContacts.goodsId !== value) {
|
|
|
- goodsDetail({id: value}).then(res => {
|
|
|
+ goodsDetail({ id: value }).then(res => {
|
|
|
this.formContacts.goodsNo = res.data.data.code
|
|
|
this.formContacts.brandId = res.data.data.brandId
|
|
|
this.formContacts.propertyName = res.data.data.specificationAndModel
|
|
@@ -548,7 +542,7 @@ export default {
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(255,255,255,0.7)'
|
|
|
})
|
|
|
- getDetails({id: id}).then(res => {
|
|
|
+ getDetails({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
loading.close();
|
|
|
}).catch(() => {
|
|
@@ -561,16 +555,16 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- if (row.id) {
|
|
|
- tradingBox(row.id).then(res => {
|
|
|
- this.form.contactsList.splice(index, 1);
|
|
|
- this.$message.success("操作成功!");
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.form[type].splice(index, 1);
|
|
|
+ if (row.id) {
|
|
|
+ tradingBox(row.id).then(res => {
|
|
|
+ this.form.contactsList.splice(index, 1);
|
|
|
this.$message.success("操作成功!");
|
|
|
- }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.form[type].splice(index, 1);
|
|
|
+ this.$message.success("操作成功!");
|
|
|
}
|
|
|
+ }
|
|
|
);
|
|
|
},
|
|
|
rowSave(form, done, loading) {
|
|
@@ -579,6 +573,10 @@ export default {
|
|
|
rowUpdate(form, index, done, loading) {
|
|
|
done(form)
|
|
|
},
|
|
|
+ //打印
|
|
|
+ handlePrint() {
|
|
|
+ this.$print('formContacts');
|
|
|
+ },
|
|
|
//自定义列保存
|
|
|
async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
/**
|