|
@@ -28,14 +28,12 @@
|
|
|
<el-col :span="4" style="width: 405px; display: flex; align-items: center">
|
|
|
<el-dropdown>
|
|
|
<el-button size="mini" style="margin-right: 10px">
|
|
|
- {{ timerMaps[timerKey].label
|
|
|
- }}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ {{ timerMaps[timerKey].label}}
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item v-for="key in Object.keys(timerMaps)" :key="key">
|
|
|
- <p @click="setTimerKey(key)">
|
|
|
- {{ timerMaps[key].label }}
|
|
|
- </p>
|
|
|
+ <p @click="setTimerKey(key)">{{ timerMaps[key].label }}</p>
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
@@ -67,9 +65,7 @@
|
|
|
type="primary"
|
|
|
style="float: right; margin-left: 5px"
|
|
|
@click="searchList"
|
|
|
- >
|
|
|
- 刷新
|
|
|
- </el-button>
|
|
|
+ >刷新</el-button>
|
|
|
</el-col>
|
|
|
<el-col
|
|
|
:span="4"
|
|
@@ -82,14 +78,12 @@
|
|
|
@click="download"
|
|
|
:size="searchSize"
|
|
|
class="fr"
|
|
|
- >
|
|
|
- 导出
|
|
|
- </el-button>
|
|
|
+ >导出</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="padding-top: 10px">
|
|
|
<el-col :span="4" style="width: 177px">
|
|
|
- <el-switch
|
|
|
+ <el-switch
|
|
|
v-model="parmValue.use_type"
|
|
|
:active-value="usetypeOtions[1].value"
|
|
|
:inactive-value="usetypeOtions[0].value"
|
|
@@ -163,14 +157,7 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4" style="width: 66px" class="fr">
|
|
|
- <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-row>
|
|
|
|
|
@@ -264,8 +251,8 @@
|
|
|
<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>
|
|
@@ -330,32 +317,33 @@ import { shareWebUrl } from "@/config";
|
|
|
import {
|
|
|
xs_order_source_options,
|
|
|
xs_order_type_options,
|
|
|
- usetypeOtions,
|
|
|
+ usetypeOtions
|
|
|
} from "@/assets/js/statusList";
|
|
|
import companyHelper from "@/mixins/companyHelper";
|
|
|
export default {
|
|
|
name: "sellOutOrder",
|
|
|
mixins: [mixinPage, resToken, companyHelper],
|
|
|
components: {
|
|
|
- addEdit,
|
|
|
+ addEdit
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
|
|
|
powers() {
|
|
|
const tran =
|
|
|
- this.$store.getters.btnList.find((item) => item.menu_route == "sellOutOrder") ||
|
|
|
- {};
|
|
|
+ this.$store.getters.btnList.find(
|
|
|
+ item => item.menu_route == "sellOutOrder"
|
|
|
+ ) || {};
|
|
|
const { action } = tran ?? {};
|
|
|
return action ?? [];
|
|
|
},
|
|
|
dpowers() {
|
|
|
const tran =
|
|
|
this.$store.getters.btnList.find(
|
|
|
- (item) => item.menu_route == "sellOutOrderDetail"
|
|
|
+ item => item.menu_route == "sellOutOrderDetail"
|
|
|
) || {};
|
|
|
const { action } = tran ?? {};
|
|
|
return action ?? [];
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -370,13 +358,13 @@ export default {
|
|
|
add: {
|
|
|
start: "start",
|
|
|
end: "end",
|
|
|
- label: "添加时间",
|
|
|
+ label: "添加时间"
|
|
|
},
|
|
|
send: {
|
|
|
start: "start_sendtime",
|
|
|
end: "end_sendtime",
|
|
|
- label: "发货时间",
|
|
|
- },
|
|
|
+ label: "发货时间"
|
|
|
+ }
|
|
|
},
|
|
|
sitem: null,
|
|
|
// 状态
|
|
@@ -412,7 +400,7 @@ export default {
|
|
|
company_name: "", //申请人部门
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
- use_type: "1",
|
|
|
+ use_type: "1"
|
|
|
},
|
|
|
// 表格 - 数据
|
|
|
tableData: [],
|
|
@@ -420,18 +408,18 @@ export default {
|
|
|
table: {
|
|
|
stripe: true,
|
|
|
border: true,
|
|
|
- _defaultHeader_: ["setcol"],
|
|
|
+ _defaultHeader_: ["setcol"]
|
|
|
},
|
|
|
// 表格 - 分页
|
|
|
pageInfo: {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
},
|
|
|
// 表格 - 列参数
|
|
|
columns,
|
|
|
xs_order_source_options,
|
|
|
- xs_order_type_options,
|
|
|
+ xs_order_type_options
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -439,7 +427,7 @@ export default {
|
|
|
const { back } = this.$route.query;
|
|
|
if (back) {
|
|
|
this.parmValue = JSON.parse(back);
|
|
|
- console.log( this.parmValue);
|
|
|
+ console.log(this.parmValue);
|
|
|
const { page, size } = this.parmValue;
|
|
|
|
|
|
// if (this.parmValue.customerCode.length > 0) {
|
|
@@ -449,7 +437,7 @@ export default {
|
|
|
this.pageInfo = {
|
|
|
size: size,
|
|
|
curr: page,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
};
|
|
|
//多选条件
|
|
|
this.select = this.parmValue.select;
|
|
@@ -466,8 +454,8 @@ export default {
|
|
|
async supplierChange(e) {
|
|
|
const { code, label } = e;
|
|
|
// this.supplierNo = code ? [code] : [];
|
|
|
- this.parmValue.supplierNo = code ? [code] : []
|
|
|
- this.parmValue.supplierName = label
|
|
|
+ this.parmValue.supplierNo = code ? [code] : [];
|
|
|
+ this.parmValue.supplierName = label;
|
|
|
this.pageInfo.curr = 1;
|
|
|
this.parmValue.page = 1;
|
|
|
this.searchList();
|
|
@@ -491,7 +479,7 @@ export default {
|
|
|
getRouter(toRouter, queryId) {
|
|
|
if (toRouter && queryId) {
|
|
|
let model = {
|
|
|
- id: queryId,
|
|
|
+ id: queryId
|
|
|
// type: 'view',
|
|
|
};
|
|
|
|
|
@@ -502,7 +490,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);
|
|
|
|
|
@@ -525,9 +513,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
let model = {
|
|
|
- outCodes: [],
|
|
|
+ outCodes: []
|
|
|
};
|
|
|
- this.changeList.forEach((item) => {
|
|
|
+ this.changeList.forEach(item => {
|
|
|
model.outCodes.push(item.outCode);
|
|
|
});
|
|
|
|
|
@@ -544,10 +532,10 @@ export default {
|
|
|
headers: {
|
|
|
// 'Content-Type': 'multipart/form-data',
|
|
|
// Accept: "application/vnd.ms-excel"
|
|
|
- Accept: httpType,
|
|
|
- },
|
|
|
+ Accept: httpType
|
|
|
+ }
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
// console.log(res)
|
|
|
// console.log(this.fileUrl)
|
|
|
// return;
|
|
@@ -555,7 +543,7 @@ export default {
|
|
|
let url = window.URL.createObjectURL(
|
|
|
new Blob([res.data], {
|
|
|
// type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
|
|
|
- type: httpType,
|
|
|
+ type: httpType
|
|
|
})
|
|
|
);
|
|
|
let link = document.createElement("a");
|
|
@@ -578,7 +566,7 @@ export default {
|
|
|
}, 500);
|
|
|
}
|
|
|
})
|
|
|
- .catch((error) => {
|
|
|
+ .catch(error => {
|
|
|
console.log(error);
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -604,13 +592,13 @@ export default {
|
|
|
company_name: "", //申请人部门
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
- use_type: "1",
|
|
|
+ use_type: "1"
|
|
|
};
|
|
|
// 表格 - 分页
|
|
|
this.pageInfo = {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
@@ -625,18 +613,18 @@ export default {
|
|
|
await this.$confirm("确定要删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(async () => {
|
|
|
const model = {
|
|
|
id: id,
|
|
|
- status: status + "" === "1" ? "0" : "1",
|
|
|
+ status: status + "" === "1" ? "0" : "1"
|
|
|
};
|
|
|
const res = await asyncRequest.status(model);
|
|
|
if (res && res.code === 0) {
|
|
|
this.$notify.success({
|
|
|
title: "删除成功",
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
this.searchList();
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
@@ -661,21 +649,31 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.loading = true;
|
|
|
- let { start, end,supplierNo, customerCode ,supplierName,customerName ,...rest } = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
+ let {
|
|
|
+ start,
|
|
|
+ end,
|
|
|
+ supplierNo,
|
|
|
+ customerCode,
|
|
|
+ supplierName,
|
|
|
+ customerName,
|
|
|
+ ...rest
|
|
|
+ } = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
|
|
|
const res = await asyncRequest.list({
|
|
|
...rest,
|
|
|
supplierNo: Array.isArray(supplierNo) ? supplierNo[0] : supplierNo,
|
|
|
- customerCode: Array.isArray(customerCode) ? customerCode[0] : customerCode,
|
|
|
+ customerCode: Array.isArray(customerCode)
|
|
|
+ ? customerCode[0]
|
|
|
+ : customerCode,
|
|
|
[startProp]: start,
|
|
|
[endProp]: end,
|
|
|
- needRela: true,
|
|
|
+ needRela: true
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
this.tableData = res.data.list;
|
|
|
this.pageInfo.total = Number(res.data.count);
|
|
|
- this.tableData.forEach((v) => {
|
|
|
+ this.tableData.forEach(v => {
|
|
|
v.good_class = "";
|
|
|
if (v.can && v.can.length > 0) {
|
|
|
v.can.forEach((x, i) => {
|
|
@@ -697,20 +695,20 @@ export default {
|
|
|
await this.$confirm("确定要改为" + str + "?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(async () => {
|
|
|
this.loading = true;
|
|
|
const model = {
|
|
|
id: id,
|
|
|
- status: status + "" === "1" ? "0" : "1",
|
|
|
+ status: status + "" === "1" ? "0" : "1"
|
|
|
};
|
|
|
const res = await asyncRequest.status(model);
|
|
|
if (res && res.code === 0) {
|
|
|
this.loading = false;
|
|
|
this.$notify.success({
|
|
|
title: "状态修改成功!",
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
await this.searchList();
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
@@ -742,11 +740,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async customerChange(e) {
|
|
|
- console.log(e)
|
|
|
+ console.log(e);
|
|
|
|
|
|
if (e && e.id) {
|
|
|
this.parmValue.customerName = e.label;
|
|
|
- this.parmValue.customerCode = e.code ? [e.code] : ""
|
|
|
+ this.parmValue.customerCode = e.code ? [e.code] : "";
|
|
|
} else {
|
|
|
this.parmValue.customerCode = [];
|
|
|
this.parmValue.customerName = "";
|
|
@@ -756,21 +754,27 @@ export default {
|
|
|
await this.searchList();
|
|
|
},
|
|
|
async handleValue() {
|
|
|
- this.parmValue.orderCode = this.select === "orderCode" ? this.s_input : "";
|
|
|
+ this.parmValue.orderCode =
|
|
|
+ this.select === "orderCode" ? this.s_input : "";
|
|
|
this.parmValue.outCode = this.select === "outCode" ? this.s_input : "";
|
|
|
- this.parmValue.supplier_name = this.select === "supplier_name" ? this.s_input : "";
|
|
|
+ this.parmValue.supplier_name =
|
|
|
+ this.select === "supplier_name" ? this.s_input : "";
|
|
|
|
|
|
// this.parmValue.supplierName =
|
|
|
// this.select === "supplierNo" ? this.s_input : "";
|
|
|
- this.parmValue.good_code = this.select === "good_code" ? this.s_input : "";
|
|
|
- this.parmValue.good_name = this.select === "good_name" ? this.s_input : "";
|
|
|
- this.parmValue.apply_name = this.select === "apply_name" ? this.s_input : "";
|
|
|
+ this.parmValue.good_code =
|
|
|
+ this.select === "good_code" ? this.s_input : "";
|
|
|
+ this.parmValue.good_name =
|
|
|
+ this.select === "good_name" ? this.s_input : "";
|
|
|
+ this.parmValue.apply_name =
|
|
|
+ this.select === "apply_name" ? this.s_input : "";
|
|
|
this.parmValue.cgdNo = this.select === "cgdNo" ? this.s_input : "";
|
|
|
- this.parmValue.company_name = this.select === "company_name" ? this.s_input : "";
|
|
|
+ this.parmValue.company_name =
|
|
|
+ this.select === "company_name" ? this.s_input : "";
|
|
|
|
|
|
await this.searchList();
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|