|
@@ -10,35 +10,35 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">订单号</div>
|
|
|
- <div class="value">{{detailData.id}}</div>
|
|
|
+ <div class="value">{{ detailData.id }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">订单日期</div>
|
|
|
- <div class="value">{{detailData.theTime}}</div>
|
|
|
+ <div class="value">{{ detailData.theTime }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">单据状态</div>
|
|
|
- <div class="value">{{detailData.examineStatus | statusFilter}}</div>
|
|
|
+ <div class="value">{{ detailData.examineStatus | statusFilter }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="16" class="item">
|
|
|
<div class="label">备注</div>
|
|
|
- <div class="value">{{detailData.remark}}</div>
|
|
|
+ <div class="value">{{ detailData.remark }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">业务员</div>
|
|
|
- <div class="value">{{detailData.serviceName}}</div>
|
|
|
+ <div class="value">{{ detailData.serviceName }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">制单人</div>
|
|
|
- <div class="value">{{detailData.createName}}</div>
|
|
|
+ <div class="value">{{ detailData.createName }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">审核人</div>
|
|
|
- <div class="value">{{detailData.examineName}}</div>
|
|
|
+ <div class="value">{{ detailData.examineName }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="item">
|
|
|
<div class="label">关闭人</div>
|
|
|
- <div class="value">{{detailData.closeName}}</div>
|
|
|
+ <div class="value">{{ detailData.closeName }}</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -48,32 +48,113 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="table" style="margin-top: 20px">
|
|
|
- <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
|
|
|
- <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
|
- <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="物料编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <el-table
|
|
|
+ :data="detailData.retailOrderItemList || []"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ max-height="400"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="序号"
|
|
|
+ type="index"
|
|
|
+ width="50"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="销售类型"
|
|
|
+ prop="saleTypeName"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="物料编码"
|
|
|
+ prop="materialCode"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="产品名称"
|
|
|
+ prop="materialName"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="规格型号"
|
|
|
+ prop="specification"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="单位"
|
|
|
+ prop="unit"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="单价"
|
|
|
+ prop="price"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="数量"
|
|
|
+ prop="qty"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="订单金额"
|
|
|
+ prop="totalAmount"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
align="center"
|
|
|
label="返利钱包(类型)"
|
|
|
prop="rebateWallets"
|
|
|
min-width="100"
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="success" size="small" v-for="item in scope.row.rebateWallets">
|
|
|
- {{item.name}}
|
|
|
- </el-tag>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column> <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <template
|
|
|
+ v-if="scope.row.rebateWallets && scope.row.rebateWallets.length"
|
|
|
+ >
|
|
|
+ <el-tag
|
|
|
+ type="success"
|
|
|
+ size="small"
|
|
|
+ v-for="item in scope.row.rebateWallets"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="返利金额"
|
|
|
+ prop="rebateAmount"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="格力折扣"
|
|
|
+ prop="totalDiscAmount"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
align="center"
|
|
|
label="现金钱包"
|
|
|
prop="wallets"
|
|
@@ -81,26 +162,78 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag type="success" size="small" v-for="item in scope.row.wallets">
|
|
|
- {{item.name}}
|
|
|
- </el-tag>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column> <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
|
|
|
+ <template v-if="scope.row.wallets && scope.row.wallets.length">
|
|
|
+ <el-tag
|
|
|
+ type="success"
|
|
|
+ size="small"
|
|
|
+ v-for="item in scope.row.wallets"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="实付金额"
|
|
|
+ prop="payAmount"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="是否直调"
|
|
|
+ prop="isDirectTransfer"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- {{scope.row.isDirectTransfer ? '是':'否'}}
|
|
|
+ {{ scope.row.isDirectTransfer ? "是" : "否" }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="可退数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="退订数量" prop="tdQty" min-width="100" show-overflow-tooltip>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="直调数量"
|
|
|
+ prop="directTransferQty"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="可退数量"
|
|
|
+ prop="refundableQty"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="退订数量"
|
|
|
+ prop="tdQty"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.tdQty" size="small" type="number"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.tdQty"
|
|
|
+ size="small"
|
|
|
+ type="number"
|
|
|
+ ></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="备注"
|
|
|
+ prop="remark"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="税率"
|
|
|
+ prop="tax"
|
|
|
+ min-width="100"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
@@ -111,11 +244,11 @@
|
|
|
<el-row :gutter="0">
|
|
|
<el-col :span="12" class="item">
|
|
|
<div class="label">操作人</div>
|
|
|
- <div class="value">{{userName}}</div>
|
|
|
+ <div class="value">{{ userName }}</div>
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="item">
|
|
|
<div class="label">退订日期</div>
|
|
|
- <div class="value">{{nowDate}}</div>
|
|
|
+ <div class="value">{{ nowDate }}</div>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="24" class="item">
|
|
|
<div class="label">退订说明</div>
|
|
@@ -126,32 +259,36 @@
|
|
|
|
|
|
<div class="page-footer">
|
|
|
<div class="footer" :class="classObj">
|
|
|
- <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="clickSubmitForm"
|
|
|
+ :loading="formLoading"
|
|
|
+ >{{ formLoading ? "提交中 ..." : "提 交" }}</el-button
|
|
|
+ >
|
|
|
<el-button @click="goBack">关 闭</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getDetail, returnData } from '@/api/supply/retail'
|
|
|
+import { getDetail, returnData } from "@/api/supply/retail";
|
|
|
|
|
|
export default {
|
|
|
- name: 'RetailReturn',
|
|
|
- componentName: 'RetailReturn',
|
|
|
- props: ['listItem'],
|
|
|
+ name: "RetailReturn",
|
|
|
+ componentName: "RetailReturn",
|
|
|
+ props: ["listItem"],
|
|
|
filters: {
|
|
|
statusFilter(val) {
|
|
|
const statusList = [
|
|
|
- { label: '已保存', value: 'SAVE' },
|
|
|
- { label: '待审核', value: 'WAIT' },
|
|
|
- { label: '审核通过', value: 'OK' },
|
|
|
- // { label: '审核驳回', value: 'FAIL' },,
|
|
|
+ { label: "已保存", value: "SAVE" },
|
|
|
+ { label: "待审核", value: "WAIT" },
|
|
|
+ { label: "审核通过", value: "OK" },
|
|
|
+ // { label: '审核驳回', value: 'FAIL' },,
|
|
|
];
|
|
|
- let obj = statusList.find(o => o.value == val);
|
|
|
- return obj ? obj.label : ''
|
|
|
- }
|
|
|
+ let obj = statusList.find((o) => o.value == val);
|
|
|
+ return obj ? (obj.label||'') : "";
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -160,20 +297,20 @@ export default {
|
|
|
|
|
|
formLoading: false,
|
|
|
mainForm: {
|
|
|
- remark: '',
|
|
|
- }
|
|
|
- }
|
|
|
+ remark: "",
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
sidebar() {
|
|
|
- return this.$store.state.app.sidebar
|
|
|
+ return this.$store.state.app.sidebar;
|
|
|
},
|
|
|
classObj() {
|
|
|
return {
|
|
|
hideSidebar: !this.sidebar.opened,
|
|
|
- openSidebar: this.sidebar.opened
|
|
|
- }
|
|
|
+ openSidebar: this.sidebar.opened,
|
|
|
+ };
|
|
|
},
|
|
|
nowDate() {
|
|
|
var date = new Date();
|
|
@@ -182,14 +319,14 @@ export default {
|
|
|
var month = date.getMonth() + 1;
|
|
|
var strDate = date.getDate();
|
|
|
if (month >= 1 && month <= 9) {
|
|
|
- month = "0" + month;
|
|
|
+ month = "0" + month;
|
|
|
}
|
|
|
if (strDate >= 0 && strDate <= 9) {
|
|
|
- strDate = "0" + strDate;
|
|
|
+ strDate = "0" + strDate;
|
|
|
}
|
|
|
var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
return currentdate;
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
created() {
|
|
@@ -199,31 +336,32 @@ export default {
|
|
|
methods: {
|
|
|
// 返回列表
|
|
|
goBack() {
|
|
|
- this.$emit('backListFormDetail');
|
|
|
+ this.$emit("backListFormDetail");
|
|
|
},
|
|
|
|
|
|
// 获取详情
|
|
|
getDetail() {
|
|
|
- getDetail({id: this.listItem.id}).then(res => {
|
|
|
+ getDetail({ id: this.listItem.id }).then((res) => {
|
|
|
this.detailData = res.data;
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// 提交
|
|
|
clickSubmitForm() {
|
|
|
- let tip = 0
|
|
|
- for(let i=0; i<this.detailData.retailOrderItemList.length; i++) {
|
|
|
- if(this.detailData.retailOrderItemList[i].tdQty) {
|
|
|
- tip+=1
|
|
|
+
|
|
|
+ let tip = 0;
|
|
|
+ for (let i = 0; i < this.detailData.retailOrderItemList.length; i++) {
|
|
|
+ if (this.detailData.retailOrderItemList[i].tdQty) {
|
|
|
+ tip += 1;
|
|
|
}
|
|
|
- if(Number(this.detailData.retailOrderItemList[i].tdQty) < 0) {
|
|
|
- this.$errorMsg('退订数量不可为负数');
|
|
|
+ if (Number(this.detailData.retailOrderItemList[i].tdQty) < 0) {
|
|
|
+ this.$errorMsg("退订数量不可为负数");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
if (tip == 0) {
|
|
|
- this.$errorMsg('请填写退订数量');
|
|
|
- return
|
|
|
+ this.$errorMsg("请填写退订数量");
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
this.formLoading = true;
|
|
@@ -232,37 +370,38 @@ export default {
|
|
|
type: 1, // 1:普通零售单,2:政策零售单
|
|
|
// examineRemark: this.mainForm.remark,
|
|
|
theTime: this.detailData.theTime,
|
|
|
- retailOrderItemList: this.detailData.retailOrderItemList
|
|
|
- }).then(res => {
|
|
|
- this.$successMsg('退订成功');
|
|
|
- this.goBack();
|
|
|
- this.$parent.getList();
|
|
|
- }).finally(res => {
|
|
|
- this.formLoading = false;
|
|
|
+ retailOrderItemList: this.detailData.retailOrderItemList,
|
|
|
})
|
|
|
+ .then((res) => {
|
|
|
+ this.$successMsg("退订成功");
|
|
|
+ this.goBack();
|
|
|
+ this.$parent.getList();
|
|
|
+ })
|
|
|
+ .finally((res) => {
|
|
|
+ this.formLoading = false;
|
|
|
+ });
|
|
|
},
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- .detail-container {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- .main-title {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-top: 20px;
|
|
|
- height: 60px;
|
|
|
- border-bottom: 1px solid #DCDFE6;
|
|
|
- margin-bottom: 20px;
|
|
|
- .title {
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
- padding-left: 10px;
|
|
|
- }
|
|
|
+.detail-container {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+.main-title {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 20px;
|
|
|
+ height: 60px;
|
|
|
+ border-bottom: 1px solid #dcdfe6;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ padding-left: 10px;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|