|
@@ -3,25 +3,17 @@
|
|
|
<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"
|
|
|
- v-if="form.statusName != '已入库'"
|
|
|
+ <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.statusName != '已入库'"
|
|
|
@click="editCustomer">保存数据
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh"
|
|
|
- type="success"
|
|
|
- size="small"
|
|
|
- v-if="form.statusName == '待入库'"
|
|
|
+ <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '待入库'"
|
|
|
@click="complete">入库完成
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -34,56 +26,45 @@
|
|
|
<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.shipItemsList"
|
|
|
- :key="key"
|
|
|
- @row-save="rowSave"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @resetColumn="resetColumnTwo('formContacts','optionContacts','optionContactsBack',274.1)"
|
|
|
- @saveColumn="saveColumnTwo('formContacts','optionContacts','optionContactsBack',274.1)">
|
|
|
+ :data="form.shipItemsList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
+ @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)"
|
|
|
+ @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)">
|
|
|
<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)">删除
|
|
|
+ @click="rowDelBox(row, index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="success" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-printer" size="small"
|
|
|
+ @click="handlePrint">打印</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="订单信息" name="payment_details">
|
|
|
- <avue-crud :option="optionPaymentDetails" ref="payment_details"
|
|
|
- :data="form.shipVOList"
|
|
|
- :key="key"
|
|
|
- @resetColumn="resetColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',274.2)"
|
|
|
- @saveColumn="saveColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',274.2)">
|
|
|
+ <avue-crud :option="optionPaymentDetails" ref="payment_details" :data="form.shipVOList" :key="key"
|
|
|
+ @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)"
|
|
|
+ @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)">
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="历史记录" name="outbound_records">
|
|
|
- <avue-crud :option="optionOutboundRecords" ref="outbound_records"
|
|
|
- :data="form.historyList"
|
|
|
- :key="key"
|
|
|
- @resetColumn="resetColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',274.3)"
|
|
|
- @saveColumn="saveColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',274.3)">
|
|
|
+ <avue-crud :option="optionOutboundRecords" ref="outbound_records" :data="form.historyList"
|
|
|
+ :key="key"
|
|
|
+ @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)"
|
|
|
+ @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)">
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</trade-card>
|
|
|
</div>
|
|
|
<el-dialog title="导入明细" append-to-body :visible.sync="excelBox" v-if="excelBox" width="555px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- v-dialog-drag>
|
|
|
- <avue-form
|
|
|
- :option="excelOption"
|
|
|
- v-model="excelForm"
|
|
|
- table-loading="excelLoading"
|
|
|
- :upload-before="uploadBefore"
|
|
|
+ :close-on-click-modal="false" v-dialog-drag>
|
|
|
+ <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading" :upload-before="uploadBefore"
|
|
|
:upload-after="uploadAfter">
|
|
|
<template slot="excelTemplate">
|
|
|
<el-button type="primary" @click="derivation">
|
|
@@ -108,9 +89,9 @@ import {
|
|
|
goodsDetail,
|
|
|
dotList
|
|
|
} from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
|
-import {dateFormat} from "@/util/date";
|
|
|
-import {getToken} from "@/util/auth";
|
|
|
-import {getMenu} from "@/api/system/menu";
|
|
|
+import { dateFormat } from "@/util/date";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
+import { getMenu } from "@/api/system/menu";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -160,20 +141,6 @@ export default {
|
|
|
span: 8,
|
|
|
column: [
|
|
|
{
|
|
|
- label: "入库单号",
|
|
|
- prop: "ordNo",
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "来源单号",
|
|
|
- prop: "srcOrdNo"
|
|
|
- }, {
|
|
|
label: "业务对象",
|
|
|
prop: "customerId",
|
|
|
type: 'select',
|
|
@@ -189,7 +156,8 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "仓库",
|
|
|
prop: "storageId",
|
|
|
search: true,
|
|
@@ -207,7 +175,23 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '库管',
|
|
|
+ prop: "stockClerkId",
|
|
|
+ type: 'select',
|
|
|
+ props: {
|
|
|
+ label: 'realName',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ dicUrl: '/api/blade-user/stockClerkList',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "商品数量",
|
|
|
prop: "goodsTotalNum",
|
|
|
search: false,
|
|
@@ -220,7 +204,8 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "业务日期",
|
|
|
prop: "createTime",
|
|
|
type: "datetime",
|
|
@@ -234,21 +219,22 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
- label: '库管',
|
|
|
- prop: "stockClerkId",
|
|
|
- type: 'select',
|
|
|
- props: {
|
|
|
- label: 'realName',
|
|
|
- value: 'id'
|
|
|
- },
|
|
|
- dicUrl: '/api/blade-user/stockClerkList',
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "入库单号",
|
|
|
+ prop: "ordNo",
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "来源单号",
|
|
|
+ prop: "srcOrdNo"
|
|
|
+ }, {
|
|
|
label: '备注',
|
|
|
prop: "remarks",
|
|
|
type: 'textarea',
|
|
@@ -322,10 +308,10 @@ export default {
|
|
|
label: "批次号",
|
|
|
prop: "dot",
|
|
|
type: "select",
|
|
|
- disabled:false,
|
|
|
- allowCreate:true,
|
|
|
- filterable:true,
|
|
|
- dicData:[],
|
|
|
+ disabled: false,
|
|
|
+ allowCreate: true,
|
|
|
+ filterable: true,
|
|
|
+ dicData: [],
|
|
|
props: {
|
|
|
label: "dot",
|
|
|
value: "dot"
|
|
@@ -480,23 +466,23 @@ export default {
|
|
|
},
|
|
|
async created() {
|
|
|
this.optionContacts = await this.getColumnData(this.getColumnName(274.1), this.optionContactsBack);
|
|
|
- this.findObject(this.optionContacts.column, "goodsId").change = ({value, column}) => {
|
|
|
- if (this.formContacts.goodsId !== value){
|
|
|
- goodsDetail({id: value}).then(res => {
|
|
|
+ this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
|
|
|
+ if (this.formContacts.goodsId !== value) {
|
|
|
+ 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
|
|
|
this.formContacts.pattern = res.data.data.brandItem
|
|
|
this.formContacts.goodsDescription = res.data.data.goodsDescription
|
|
|
this.formContacts.units = res.data.data.unit
|
|
|
- if (res.data.data.whether == 0){
|
|
|
+ if (res.data.data.whether == 0) {
|
|
|
this.findObject(this.optionContacts.column, "dot").disabled = true
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.findObject(this.optionContacts.column, "dot").disabled = false
|
|
|
dotList({
|
|
|
- storageId:this.form.storageId,
|
|
|
- goodsId:this.formContacts.goodsId
|
|
|
- }).then(res=>{
|
|
|
+ storageId: this.form.storageId,
|
|
|
+ goodsId: this.formContacts.goodsId
|
|
|
+ }).then(res => {
|
|
|
this.findObject(this.optionContacts.column, "dot").dicData = res.data.data
|
|
|
})
|
|
|
}
|
|
@@ -590,7 +576,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(() => {
|
|
@@ -603,16 +589,16 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- if (row.id) {
|
|
|
- tradingBox(row.id).then(res => {
|
|
|
- this.form.shipItemsList.splice(index, 1);
|
|
|
- this.$message.success("操作成功!");
|
|
|
- });
|
|
|
- } else {
|
|
|
+ if (row.id) {
|
|
|
+ tradingBox(row.id).then(res => {
|
|
|
this.form.shipItemsList.splice(index, 1);
|
|
|
this.$message.success("操作成功!");
|
|
|
- }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.form.shipItemsList.splice(index, 1);
|
|
|
+ this.$message.success("操作成功!");
|
|
|
}
|
|
|
+ }
|
|
|
);
|
|
|
},
|
|
|
rowSave(form, done, loading) {
|
|
@@ -623,6 +609,18 @@ export default {
|
|
|
console.log(form)
|
|
|
done(form);
|
|
|
},
|
|
|
+ handlePrint() {
|
|
|
+ const salesDetail = this.form.orderItemsList;
|
|
|
+ // 调用 Avue 的打印方法
|
|
|
+ this.$print({
|
|
|
+ title: '销售明细打印', // 打印页面的标题
|
|
|
+ printBody: [
|
|
|
+ // 构建打印内容,可以根据实际需求进行调整
|
|
|
+ { type: 'html', value: '<h1>销售明细</h1>' },
|
|
|
+ { type: 'table', value: salesDetail }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ },
|
|
|
//自定义列保存
|
|
|
async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
/**
|