|
@@ -75,8 +75,8 @@
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
|
/>
|
|
|
- </el-select> -->
|
|
|
- <el-switch
|
|
|
+ </el-select>-->
|
|
|
+ <el-switch
|
|
|
v-model="parmValue.use_type"
|
|
|
:active-value="usetypeOtions[1].value"
|
|
|
:inactive-value="usetypeOtions[0].value"
|
|
@@ -96,20 +96,20 @@
|
|
|
type="primary"
|
|
|
style="float: right; margin-left: 5px"
|
|
|
@click="searchList"
|
|
|
- >
|
|
|
- 刷新
|
|
|
- </el-button>
|
|
|
+ >刷新</el-button>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="3" style="width: 66px; float: right" v-if="!isSupertube && powers.includes('094')">
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ style="width: 66px; float: right"
|
|
|
+ v-if="!isSupertube && powers.includes('094')"
|
|
|
+ >
|
|
|
<el-button
|
|
|
:size="searchSize"
|
|
|
type="primary"
|
|
|
style="float: right; margin-left: 5px"
|
|
|
@click="set_user(selection)"
|
|
|
- >
|
|
|
- 设置订单用途
|
|
|
- </el-button>
|
|
|
+ >设置订单用途</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="padding: 10px 0 0 0">
|
|
@@ -169,14 +169,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4" style="width: 66px; float: right">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- class="fr"
|
|
|
- :size="searchSize"
|
|
|
- @click="restSearch"
|
|
|
- >
|
|
|
- 重置
|
|
|
- </el-button>
|
|
|
+ <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">重置</el-button>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col
|
|
@@ -189,9 +182,7 @@
|
|
|
type="success"
|
|
|
style="float: right"
|
|
|
@click="routeGoto('salesOrderDetail', { id: 'add', type: 'add' })"
|
|
|
- >
|
|
|
- 新建
|
|
|
- </el-button>
|
|
|
+ >新建</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
@@ -237,15 +228,15 @@
|
|
|
<span v-for="(si, i) in scope.row.speclist" :key="si.spec_id + i">
|
|
|
<span v-if="i !== 0">-</span>
|
|
|
<span v-else>_</span>
|
|
|
- <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
|
|
|
+ <span>{{ si.spec_name }}[{{ si.spec_value || si.spec_value_name }}]</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
|
|
|
<template #use_type="{ scope }">
|
|
|
<el-tag size="mini">
|
|
|
{{
|
|
|
- (usetypeOtions.find(({ value }) => value === scope.row.use_type) || {})
|
|
|
- .label || "---"
|
|
|
+ (usetypeOtions.find(({ value }) => value === scope.row.use_type) || {})
|
|
|
+ .label || "---"
|
|
|
}}
|
|
|
</el-tag>
|
|
|
</template>
|
|
@@ -253,13 +244,15 @@
|
|
|
<template #cgd_status="{ scope }">
|
|
|
<el-tag size="mini">
|
|
|
<template v-if="String(scope.row.order_type) === '1'">--</template>
|
|
|
- <template v-else>{{
|
|
|
+ <template v-else>
|
|
|
+ {{
|
|
|
(
|
|
|
- purchaseStatusOptions.find(
|
|
|
- ({ value }) => value === scope.row.cgd_status
|
|
|
- ) || {}
|
|
|
+ purchaseStatusOptions.find(
|
|
|
+ ({ value }) => value === scope.row.cgd_status
|
|
|
+ ) || {}
|
|
|
).label || "---"
|
|
|
- }}</template>
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
|
|
@@ -299,10 +292,7 @@
|
|
|
|
|
|
<template #operation="{ scope }">
|
|
|
<el-tooltip effect="dark" content="详情" placement="top">
|
|
|
- <i
|
|
|
- class="el-icon-view tb-icon"
|
|
|
- @click="getRouter('salesOrderDetail', scope.row.id)"
|
|
|
- ></i>
|
|
|
+ <i class="el-icon-view tb-icon" @click="getRouter('salesOrderDetail', scope.row.id)"></i>
|
|
|
</el-tooltip>
|
|
|
|
|
|
<el-tooltip
|
|
@@ -310,10 +300,7 @@
|
|
|
placement="top"
|
|
|
v-if="isCancel(scope.row) && powers.includes('006') && !isSupertube"
|
|
|
>
|
|
|
- <i
|
|
|
- class="el-icon-refresh-right tb-icon"
|
|
|
- @click="handleOrderCancel(scope.row)"
|
|
|
- />
|
|
|
+ <i class="el-icon-refresh-right tb-icon" @click="handleOrderCancel(scope.row)" />
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</ex-table>
|
|
@@ -354,7 +341,7 @@ import { MessageBox } from "element-ui";
|
|
|
import {
|
|
|
xs_order_type_options,
|
|
|
xs_order_source_options,
|
|
|
- usetypeOtions,
|
|
|
+ usetypeOtions
|
|
|
} from "@/assets/js/statusList";
|
|
|
|
|
|
export default {
|
|
@@ -362,16 +349,18 @@ export default {
|
|
|
mixins: [mixinPage, resToken, companyHelper],
|
|
|
components: {
|
|
|
addEdit,
|
|
|
- userAddEdit,
|
|
|
+ userAddEdit
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
|
|
|
powers() {
|
|
|
const tran =
|
|
|
- this.$store.getters.btnList.find((item) => item.menu_route == "salesOrder") || {};
|
|
|
+ this.$store.getters.btnList.find(
|
|
|
+ item => item.menu_route == "salesOrder"
|
|
|
+ ) || {};
|
|
|
const { action } = tran ?? {};
|
|
|
return action ?? [];
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -386,7 +375,7 @@ export default {
|
|
|
{ id: "0", label: "待发货" },
|
|
|
{ id: "1", label: "待发货完成" },
|
|
|
{ id: "2", label: "发货已完成" },
|
|
|
- { id: "3", label: "订单已取消" },
|
|
|
+ { id: "3", label: "订单已取消" }
|
|
|
],
|
|
|
/* 采购单状态 **/
|
|
|
purchaseStatusOptions: [
|
|
@@ -394,7 +383,7 @@ export default {
|
|
|
{ value: "1", label: "待入库" },
|
|
|
{ value: "2", label: "部分入库" },
|
|
|
{ value: "3", label: "入库完成" },
|
|
|
- { value: "4", label: "已取消订单" },
|
|
|
+ { value: "4", label: "已取消订单" }
|
|
|
],
|
|
|
xs_order_type_options,
|
|
|
xs_order_source_options,
|
|
@@ -418,7 +407,7 @@ export default {
|
|
|
start: "", //新建起始时间
|
|
|
end: "", // 新建结束时间
|
|
|
company_name: "", //创建人部门
|
|
|
- use_type: "1",
|
|
|
+ use_type: "1"
|
|
|
},
|
|
|
// 表格 - 数据
|
|
|
tableData: [],
|
|
@@ -426,18 +415,18 @@ export default {
|
|
|
table: {
|
|
|
stripe: true,
|
|
|
border: true,
|
|
|
- _defaultHeader_: ["setcol"],
|
|
|
+ _defaultHeader_: ["setcol"]
|
|
|
},
|
|
|
// 表格 - 分页
|
|
|
pageInfo: {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
},
|
|
|
// 表格 - 列参数
|
|
|
columns: columns,
|
|
|
orderCodeList: [],
|
|
|
- userShowModel: false,
|
|
|
+ userShowModel: false
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -454,7 +443,7 @@ export default {
|
|
|
this.pageInfo = {
|
|
|
size: size,
|
|
|
curr: page,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
};
|
|
|
//多选条件
|
|
|
this.select = this.parmValue.select;
|
|
@@ -479,13 +468,13 @@ export default {
|
|
|
},
|
|
|
handleOrderCancel(row) {
|
|
|
MessageBox.confirm("是否确认撤销该销售订单?").then(async () => {
|
|
|
- try{
|
|
|
+ try {
|
|
|
const { orderCode } = row;
|
|
|
- this.loading = true
|
|
|
+ this.loading = true;
|
|
|
const { code, message } = await asyncRequest.orderCancel({
|
|
|
- orderCode: [orderCode],
|
|
|
+ orderCode: [orderCode]
|
|
|
});
|
|
|
- this.loading = false
|
|
|
+ this.loading = false;
|
|
|
|
|
|
switch (Number(code)) {
|
|
|
case 0:
|
|
@@ -495,8 +484,8 @@ export default {
|
|
|
this.$message.warning(message);
|
|
|
break;
|
|
|
}
|
|
|
- }catch(e){
|
|
|
- this.loading = false
|
|
|
+ } catch (e) {
|
|
|
+ this.loading = false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -504,7 +493,7 @@ export default {
|
|
|
if (toRouter && queryId) {
|
|
|
let model = {
|
|
|
id: queryId,
|
|
|
- type: "view",
|
|
|
+ type: "view"
|
|
|
};
|
|
|
|
|
|
//有多选框的条件
|
|
@@ -514,7 +503,7 @@ export default {
|
|
|
//
|
|
|
let routerModel = {
|
|
|
options: JSON.parse(JSON.stringify(this.parmValue)),
|
|
|
- router: this.$route.path,
|
|
|
+ router: this.$route.path
|
|
|
};
|
|
|
model.preModel = JSON.stringify(routerModel);
|
|
|
|
|
@@ -541,13 +530,13 @@ export default {
|
|
|
start: "", //新建起始时间
|
|
|
end: "", // 新建结束时间
|
|
|
company_name: "", //部门
|
|
|
- use_type: "1",
|
|
|
+ use_type: "1"
|
|
|
};
|
|
|
// 表格 - 分页
|
|
|
this.pageInfo = {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
@@ -571,7 +560,7 @@ export default {
|
|
|
}
|
|
|
this.orderCodeList = [];
|
|
|
let isok = true;
|
|
|
- selection.forEach((e) => {
|
|
|
+ selection.forEach(e => {
|
|
|
this.orderCodeList.push(e.orderCode);
|
|
|
if (e.use_order) {
|
|
|
isok = false;
|
|
@@ -621,17 +610,19 @@ export default {
|
|
|
this.loading = true;
|
|
|
this.parmValue.orderCode = this.select === "orderCode" ? this.input : "";
|
|
|
this.parmValue.good_name = this.select === "good_name" ? this.input : "";
|
|
|
- this.parmValue.apply_name = this.select === "apply_name" ? this.input : "";
|
|
|
- this.parmValue.company_name = this.select === "company_name" ? this.input : "";
|
|
|
+ this.parmValue.apply_name =
|
|
|
+ this.select === "apply_name" ? this.input : "";
|
|
|
+ this.parmValue.company_name =
|
|
|
+ this.select === "company_name" ? this.input : "";
|
|
|
|
|
|
const res = await asyncRequest.list({
|
|
|
...this.parmValue,
|
|
|
- needRela: true,
|
|
|
+ needRela: true
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
this.tableData = res.data.list;
|
|
|
- this.tableData.forEach((v) => {
|
|
|
+ this.tableData.forEach(v => {
|
|
|
v.good_class = "";
|
|
|
if (v.can && v.can.length > 0) {
|
|
|
v.can.forEach((x, i) => {
|
|
@@ -660,8 +651,8 @@ export default {
|
|
|
} else {
|
|
|
this.parmValue.end = "";
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|