|
@@ -1,49 +1,16 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<basic-container v-show="!detailsOpen">
|
|
|
- <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
|
|
|
+ <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="dataList"
|
|
|
ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
|
|
|
@expand-change="expandChange" @refresh-change="refreshChange"
|
|
|
@resetColumn="resetColumnTwo('crud', 'option', 'optionList', 433)"
|
|
|
@saveColumn="saveColumnTwo('crud', 'option', 'optionList', 433)" :page.sync="page">
|
|
|
- <template slot-scope="{ row }" slot="status">
|
|
|
- <span v-for="(item, index) in orderStatusList" :key="index">
|
|
|
- <span v-if="item.dictKey == row.status" :style="{ background: item.colour }" class="bottomBox">
|
|
|
- {{ item.dictValue }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row }" slot="actualPaymentStatus">
|
|
|
- <span v-for="(item, index) in actualStatusList" :key="index">
|
|
|
- <span v-if="item.dictKey == row.actualPaymentStatus" :style="{ background: item.colour }" class="bottomBox">
|
|
|
- {{ item.dictValue }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row }" slot="returnsStatus">
|
|
|
- <span v-for="(item, index) in returnStatusList" :key="index">
|
|
|
- <span v-if="item.dictKey == row.returnsStatus" :style="{ background: item.colour }" class="bottomBox">
|
|
|
- {{ item.dictValue }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <!--actualPaymentStatus-->
|
|
|
- <template slot-scope="{ row }" slot="expand">
|
|
|
- <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
|
|
|
- class="itemTable"></avue-crud>
|
|
|
- </template>
|
|
|
<template slot-scope="{type,size,row,index}" slot="menu">
|
|
|
- <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
|
|
|
<el-button :size="size" :type="type"
|
|
|
:disabled="row.status != '录入' && row.status != '待确认' && row.item >= 1 || row.businessSource == '外部销售'"
|
|
|
@click="$refs.crud.rowDel(row, index)">删除</el-button>
|
|
|
</template>
|
|
|
- <template slot="corpNameSearch">
|
|
|
- <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
|
|
|
- </template>
|
|
|
- <template slot="notCompleteSearch">
|
|
|
- <el-checkbox v-model="search.notComplete" true-label="1"></el-checkbox>
|
|
|
- </template>
|
|
|
<template slot-scope="{type,size,row,$index}" slot="menuLeft">
|
|
|
<el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单</el-button>
|
|
|
<el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
|
|
@@ -52,21 +19,20 @@
|
|
|
<span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.ordNo }}
|
|
|
</span>
|
|
|
</template>
|
|
|
- <template slot-scope="{ row, index }" slot="srcOrdNo">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 3)">{{ row.srcOrdNo }}
|
|
|
- </span>
|
|
|
+ <template slot="notCompleteSearch">
|
|
|
+ <el-checkbox v-model="search.notComplete" true-label="1"></el-checkbox>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
- <detailsPage v-if="detailsOpen" @goBack="goBack" :onLoad="form" :detailData="detailData" @backToList="backToList">
|
|
|
+ <detailsPage v-if="detailsOpen" @goBack="goBack" :detailData="detailData">
|
|
|
</detailsPage>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getList, remove, getGoodsInfo } from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
+import { getList, remove} from "@/api/tirePartsMall/basicData/shareSales";
|
|
|
import detailsPage from "./detailsPage"
|
|
|
-import { getDetails } from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
+import { getDetails } from "@/api/tirePartsMall/basicData/shareSales";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
|
|
|
export default {
|
|
@@ -82,7 +48,6 @@ export default {
|
|
|
returnStatusList: [],
|
|
|
loading: false,
|
|
|
search: {},
|
|
|
- form: {},
|
|
|
dataList: [],
|
|
|
detailData: {},
|
|
|
page: {
|
|
@@ -92,97 +57,6 @@ export default {
|
|
|
pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
},
|
|
|
key: 0,
|
|
|
- itemOption: {
|
|
|
- align: "center",
|
|
|
- header: false,
|
|
|
- border: true,
|
|
|
- menu: false,
|
|
|
- column: [
|
|
|
- {
|
|
|
- label: '商品名称',
|
|
|
- prop: 'goodsName',
|
|
|
- width: 200,
|
|
|
- overHidden: true,
|
|
|
- // dicData: [],
|
|
|
- // props: {
|
|
|
- // label: 'cname',
|
|
|
- // value: 'cname'
|
|
|
- // },
|
|
|
- // dicUrl: "/api/blade-sales-part/goodsDesc/goodsListAll"
|
|
|
- }, {
|
|
|
- label: '数量',
|
|
|
- prop: 'goodsNum',
|
|
|
- overHidden: true,
|
|
|
- width: 100,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '价格',
|
|
|
- prop: 'price',
|
|
|
- overHidden: true,
|
|
|
- width: 100,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '批次号',
|
|
|
- prop: 'dot',
|
|
|
- type: "select",
|
|
|
- disabled: true,
|
|
|
- allowCreate: true,
|
|
|
- filterable: true,
|
|
|
- width: 150,
|
|
|
- dicData: [],
|
|
|
- props: {
|
|
|
- label: "dot",
|
|
|
- value: "dot"
|
|
|
- },
|
|
|
- dicUrl: "/api/blade-sales-part/stockDesc/dotList",
|
|
|
- overHidden: true,
|
|
|
- }, {
|
|
|
- label: '商品编码',
|
|
|
- prop: 'goodsNo',
|
|
|
- overHidden: true,
|
|
|
- width: 150
|
|
|
- },
|
|
|
- // {
|
|
|
- // label: '品牌',
|
|
|
- // prop: 'brandId',
|
|
|
- // disabled: false,
|
|
|
- // width: 100,
|
|
|
- // overHidden: true,
|
|
|
- // props: {
|
|
|
- // label: 'cname',
|
|
|
- // value: 'id'
|
|
|
- // },
|
|
|
- // dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP'
|
|
|
- // },
|
|
|
- {
|
|
|
- label: '品牌',
|
|
|
- prop: 'brandName',
|
|
|
- overHidden: true,
|
|
|
- disabled: false,
|
|
|
- width: 150
|
|
|
- },
|
|
|
- {
|
|
|
- label: '规格型号',
|
|
|
- prop: 'propertyName',
|
|
|
- overHidden: true,
|
|
|
- disabled: false,
|
|
|
- width: 150
|
|
|
- },
|
|
|
- {
|
|
|
- label: '花纹',
|
|
|
- prop: 'pattern',
|
|
|
- overHidden: true,
|
|
|
- disabled: false,
|
|
|
- width: 150
|
|
|
- },
|
|
|
- {
|
|
|
- label: '发货数量',
|
|
|
- prop: 'sendNum',
|
|
|
- disabled: false,
|
|
|
- overHidden: true,
|
|
|
- width: 100,
|
|
|
- }]
|
|
|
- },
|
|
|
option: {},
|
|
|
optionList: {
|
|
|
viewBtn: false,
|
|
@@ -200,8 +74,6 @@ export default {
|
|
|
searchSpan: 6,
|
|
|
searchMenuSpan: 24,
|
|
|
searchIcon: true,
|
|
|
- expand: true,
|
|
|
- expandWidth: 60,
|
|
|
searchIndex: 3,
|
|
|
highlightCurrentRow: true,
|
|
|
dialogWidth: "70%",
|
|
@@ -475,28 +347,6 @@ export default {
|
|
|
},
|
|
|
activated() {
|
|
|
setTimeout(() => {
|
|
|
- console.log(this.$route.query, 400)
|
|
|
- // 主页快捷跳转来的 直接打开新建订单
|
|
|
- if (this.$route.query.showTrue) {
|
|
|
- this.$store.commit("IN_LTXS_STATUS");
|
|
|
- this.detailsOpen = true;
|
|
|
- }
|
|
|
- if (this.$route.query.check) {
|
|
|
- this.editOpen({ id: this.$route.query.check.srcBillId }, 1)
|
|
|
- this.$store.commit("IN_LTXS_STATUS");
|
|
|
- }
|
|
|
- if (this.$route.query.type == 'S') {
|
|
|
- this.editOpen({ id: this.$route.query.detail.srcParentId }, 1)
|
|
|
- }
|
|
|
- if (this.$route.query.jumpId) {
|
|
|
- this.editOpen({ id: this.$route.query.jumpId }, 1)
|
|
|
- }
|
|
|
-
|
|
|
- this.detailData = {
|
|
|
- id: this.$route.query.check.billId,
|
|
|
- check: this.$route.query.check,
|
|
|
- auditId: this.$route.query.check.id
|
|
|
- };
|
|
|
}, 100);
|
|
|
},
|
|
|
async created() {
|
|
@@ -506,21 +356,6 @@ export default {
|
|
|
this.option.column.forEach(item => {
|
|
|
if (item.search) i++
|
|
|
})
|
|
|
- // if (i % 3 !== 0) {
|
|
|
- // const num = 3 - Number(i % 3)
|
|
|
- // this.option.searchMenuSpan = num * 8;
|
|
|
- // this.option.searchMenuPosition = "right";
|
|
|
- // }
|
|
|
- this.getWorkDicts("sales_Status").then(res => {
|
|
|
- this.orderStatusList = res.data.data
|
|
|
- console.log(this.orderStatusList);
|
|
|
- });
|
|
|
- this.getWorkDicts("settlement_Status").then(res => {
|
|
|
- this.actualStatusList = res.data.data
|
|
|
- });
|
|
|
- this.getWorkDicts("return_Status").then(res => {
|
|
|
- this.returnStatusList = res.data.data
|
|
|
- });
|
|
|
},
|
|
|
methods: {
|
|
|
// 导出
|
|
@@ -550,62 +385,41 @@ export default {
|
|
|
window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
},
|
|
|
check(row) {
|
|
|
- this.form = row
|
|
|
this.detailsOpen = true
|
|
|
},
|
|
|
- backToList(type) {
|
|
|
+ goBack(type) {
|
|
|
if (JSON.stringify(this.$route.query) != "{}") {
|
|
|
this.$router.$avueRouter.closeTag();
|
|
|
this.$router.push({
|
|
|
path: "/tirePartsMall/salesManagement/saleOrder/index"
|
|
|
});
|
|
|
}
|
|
|
- this.form = {}
|
|
|
+ this.detailData = {}
|
|
|
this.detailsOpen = false
|
|
|
- if (type === 0) {
|
|
|
- this.detailData = {}
|
|
|
- }
|
|
|
this.onLoad(this.page, this.search)
|
|
|
- this.$store.commit("OUT_LTXS_STATUS");
|
|
|
-
|
|
|
},
|
|
|
editOpen(row, status) {
|
|
|
- this.form = row
|
|
|
this.detailData = {
|
|
|
id: row.id,
|
|
|
status: status
|
|
|
};
|
|
|
- console.log(status);
|
|
|
- this.$store.commit("IN_LTXS_STATUS");
|
|
|
this.detailsOpen = true;
|
|
|
},
|
|
|
//刷新
|
|
|
refreshChange() {
|
|
|
this.onLoad(this.page, this.search)
|
|
|
},
|
|
|
- expandChange(row) {
|
|
|
- if (!row.itemData) {
|
|
|
- getDetails({ id: row.id })
|
|
|
- .then(res => {
|
|
|
- this.dataList[row.$index].itemData = res.data.data.orderItemsList;
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.dataList[row.$index].itemLoading = false;
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- rowDel(form, index) {
|
|
|
+ rowDel(row, index) {
|
|
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- remove({ id: form.id }).then(res => {
|
|
|
+ remove({ ids: row.id }).then(res => {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '删除成功!'
|
|
|
});
|
|
|
- this.dataList.splice(index, 1);
|
|
|
this.onLoad(this.page)
|
|
|
})
|
|
|
}).catch(() => {
|
|
@@ -613,7 +427,6 @@ export default {
|
|
|
},
|
|
|
searchChange(params, done) {
|
|
|
this.page.currentPage = 1
|
|
|
- params.notComplete = 1
|
|
|
this.onLoad(this.page, params)
|
|
|
done();
|
|
|
},
|
|
@@ -630,14 +443,8 @@ export default {
|
|
|
this.$refs.crud.toggleRowExpansion(item, false);
|
|
|
});
|
|
|
getList(params).then(res => {
|
|
|
- if (res.data.data.records) {
|
|
|
- res.data.data.records.forEach(e => {
|
|
|
- e.itemLoading = true;
|
|
|
- });
|
|
|
- }
|
|
|
this.dataList = res.data.data.records
|
|
|
this.page.total = res.data.data.total
|
|
|
-
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.crud.doLayout()
|
|
|
this.$refs.crud.dicInit()
|