|
@@ -59,8 +59,16 @@
|
|
|
>批量下生产</Button
|
|
|
>
|
|
|
</div>
|
|
|
-
|
|
|
<div slot="navButton" style="display: flex">
|
|
|
+ <!-- v-if="persimissionData['排序设置'] || persimissionData.all" -->
|
|
|
+ <Button
|
|
|
+ @click="handleSortSet"
|
|
|
+ type="primary"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ ghost
|
|
|
+ icon="ios-cog"
|
|
|
+ >排序设置</Button
|
|
|
+ >
|
|
|
<Button
|
|
|
v-if="persimissionData['表头设置'] || persimissionData.all"
|
|
|
@click="setupTableHeader"
|
|
@@ -168,8 +176,11 @@
|
|
|
/>
|
|
|
</FormItem>
|
|
|
<FormItem label="备注:">
|
|
|
- <Input type="text" v-model="chargeModalForm.remark"
|
|
|
- placeholder="请输入备注" />
|
|
|
+ <Input
|
|
|
+ type="text"
|
|
|
+ v-model="chargeModalForm.remark"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ />
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
<Table
|
|
@@ -211,6 +222,76 @@
|
|
|
</Tabs>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
+ <!-- 排序设置弹窗 -->
|
|
|
+
|
|
|
+ <Modal v-model="showSortModal" title="排序设置" width="650">
|
|
|
+ <div>
|
|
|
+ <Form
|
|
|
+ :label-width="80"
|
|
|
+ inline
|
|
|
+ v-for="(_item, _index) in sortList"
|
|
|
+ :key="_index"
|
|
|
+ >
|
|
|
+ <FormItem :label="'关键字' + (_index + 1)">
|
|
|
+ <Select filterable clearable transfer v-model="_item.value">
|
|
|
+ <Option
|
|
|
+ v-for="item of headerList"
|
|
|
+ :key="item.key"
|
|
|
+ :label="item.title"
|
|
|
+ :value="item.key"
|
|
|
+ ></Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem label="排序方式">
|
|
|
+ <Select
|
|
|
+ style="width:150px"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ transfer
|
|
|
+ v-model="_item.sort"
|
|
|
+ >
|
|
|
+ <Option label="升序" :value="1"></Option>
|
|
|
+ <Option label="降序" :value="2"></Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem :label-width="10">
|
|
|
+ <Icon
|
|
|
+ @click="
|
|
|
+ handleSortListChange(sortList, 0, _index, {
|
|
|
+ sort: null,
|
|
|
+ level: sortList.length + 1,
|
|
|
+ value: '',
|
|
|
+ })
|
|
|
+ "
|
|
|
+ style="'margin:0 10px"
|
|
|
+ size="20"
|
|
|
+ type="ios-add"
|
|
|
+ />
|
|
|
+ <Icon
|
|
|
+ @click="handleSortListChange(sortList, 1, _index, null)"
|
|
|
+ v-show="sortList.length > 1"
|
|
|
+ style="'margin:0 10px"
|
|
|
+ size="20"
|
|
|
+ type="ios-remove"
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ </div>
|
|
|
+ <div slot="footer">
|
|
|
+ <Button
|
|
|
+ @click="showSortModal = false"
|
|
|
+ type="primary"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ >取消</Button
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ @click="handleConfirmSort"
|
|
|
+ type="primary"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ >确定</Button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -236,7 +317,12 @@ export default {
|
|
|
minWidth: 200,
|
|
|
},
|
|
|
{ title: "业务员", align: "center", key: "nickname", minWidth: 150 },
|
|
|
- { title: "客户姓名", align: "center", key: "client_name", minWidth: 150 },
|
|
|
+ {
|
|
|
+ title: "客户姓名",
|
|
|
+ align: "center",
|
|
|
+ key: "client_name",
|
|
|
+ minWidth: 150,
|
|
|
+ },
|
|
|
{ title: "客户地址", align: "center", key: "address", minWidth: 200 },
|
|
|
{ title: "审核人", align: "center", key: "crt_name", minWidth: 150 },
|
|
|
{
|
|
@@ -470,7 +556,12 @@ export default {
|
|
|
value: "项目名称",
|
|
|
title: "项目名称",
|
|
|
},
|
|
|
- { is_show: true, key: "client_name", value: "客户姓名", title: "客户姓名" },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "client_name",
|
|
|
+ value: "客户姓名",
|
|
|
+ title: "客户姓名",
|
|
|
+ },
|
|
|
{ is_show: true, key: "address", value: "客户地址", title: "客户地址" },
|
|
|
{ is_show: true, key: "salesman", value: "业务员", title: "业务员" },
|
|
|
{ is_show: true, key: "state", value: "订单状态", title: "订单状态" },
|
|
@@ -554,7 +645,12 @@ export default {
|
|
|
title: "项目名称",
|
|
|
},
|
|
|
{ is_show: true, key: "nickname", value: "业务员", title: "业务员" },
|
|
|
- { is_show: true, key: "client_name", value: "客户姓名", title: "客户姓名" },
|
|
|
+ {
|
|
|
+ is_show: true,
|
|
|
+ key: "client_name",
|
|
|
+ value: "客户姓名",
|
|
|
+ title: "客户姓名",
|
|
|
+ },
|
|
|
{ is_show: true, key: "address", value: "客户地址", title: "客户地址" },
|
|
|
{ is_show: true, key: "crt_name", value: "审核人", title: "审核人" },
|
|
|
{
|
|
@@ -617,6 +713,9 @@ export default {
|
|
|
remark: null,
|
|
|
},
|
|
|
warningList: [],
|
|
|
+ showSortModal: false,
|
|
|
+ sortList: [{ sort: null, level: 1, value: "" }],
|
|
|
+ headerList: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -722,6 +821,16 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ computedTable() {
|
|
|
+ if (this.computedTable[0].title == "全选") {
|
|
|
+ this.headerList = JSON.parse(JSON.stringify(this.computedTable));
|
|
|
+ this.headerList.splice(0, 1);
|
|
|
+ } else {
|
|
|
+ this.headerList = this.computedTable;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {
|
|
|
// 获取紧急程度
|
|
|
this.axios.get("/api/warning_list").then((res) => {
|
|
@@ -752,26 +861,28 @@ export default {
|
|
|
getData(row) {
|
|
|
this.loading = true;
|
|
|
this.axios("/api/order_list_new", { params: row }).then((res) => {
|
|
|
- this.loading = false;
|
|
|
- if (!res.data.data) {
|
|
|
- return this.$Message.error("列表数据返回格式不正确");
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.loading = false;
|
|
|
+ if (!res.data.data) {
|
|
|
+ return this.$Message.error("列表数据返回格式不正确");
|
|
|
+ }
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ this.total = res.data.total;
|
|
|
+ this.tableModalTableData =
|
|
|
+ res.data.tableSet.tableSet.length < 1
|
|
|
+ ? this.tableModalTableData
|
|
|
+ : res.data.tableSet.tableSet;
|
|
|
+ this.formModalTableData =
|
|
|
+ res.data.tableSet.formSet.length < 1
|
|
|
+ ? this.formModalTableData
|
|
|
+ : res.data.tableSet.formSet;
|
|
|
+ this.sub_formModalTableData = JSON.parse(
|
|
|
+ JSON.stringify(this.formModalTableData)
|
|
|
+ );
|
|
|
+ this.sub_tableModalTableData = JSON.parse(
|
|
|
+ JSON.stringify(this.tableModalTableData)
|
|
|
+ );
|
|
|
}
|
|
|
- this.tableData = res.data.data;
|
|
|
- this.total = res.data.total;
|
|
|
- this.tableModalTableData =
|
|
|
- res.data.tableSet.tableSet.length < 1
|
|
|
- ? this.tableModalTableData
|
|
|
- : res.data.tableSet.tableSet;
|
|
|
- this.formModalTableData =
|
|
|
- res.data.tableSet.formSet.length < 1
|
|
|
- ? this.formModalTableData
|
|
|
- : res.data.tableSet.formSet;
|
|
|
- this.sub_formModalTableData = JSON.parse(
|
|
|
- JSON.stringify(this.formModalTableData)
|
|
|
- );
|
|
|
- this.sub_tableModalTableData = JSON.parse(
|
|
|
- JSON.stringify(this.tableModalTableData)
|
|
|
- );
|
|
|
});
|
|
|
},
|
|
|
changePage(e) {
|
|
@@ -797,17 +908,7 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- goDetial(row) {
|
|
|
- row.renovation_type == 2
|
|
|
- ? this.$router.push({
|
|
|
- path: "/cms/ordermannage/businessorderlist/details",
|
|
|
- query: { order_no: row.order_no, type: "business" },
|
|
|
- })
|
|
|
- : this.$router.push({
|
|
|
- path: "/cms/ordermannage/businessorderlist/details",
|
|
|
- query: { id: row.id, type: "business", order_no: row.order_no },
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
handleChargeModalOk() {
|
|
|
this.axios
|
|
|
.post("/api/order_price_add", { ...this.chargeModalForm })
|
|
@@ -896,6 +997,45 @@ export default {
|
|
|
this.showModal = true;
|
|
|
return;
|
|
|
},
|
|
|
+ handleSortSet() {
|
|
|
+ this.showSortModal = true;
|
|
|
+ },
|
|
|
+ handleSortListChange(arr, type, index, obj) {
|
|
|
+ if (obj) {
|
|
|
+ arr.splice(index + 1, type, obj);
|
|
|
+ } else {
|
|
|
+ arr.splice(index, type);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleConfirmSort() {
|
|
|
+ this.loading = true;
|
|
|
+ this.axios("/api/order_list_new", {
|
|
|
+ params: { ...this.proxyObj, sortList: this.sortList },
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.loading = false;
|
|
|
+ if (!res.data.data) {
|
|
|
+ return this.$Message.error("列表数据返回格式不正确");
|
|
|
+ }
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ this.total = res.data.total;
|
|
|
+ this.tableModalTableData =
|
|
|
+ res.data.tableSet.tableSet.length < 1
|
|
|
+ ? this.tableModalTableData
|
|
|
+ : res.data.tableSet.tableSet;
|
|
|
+ this.formModalTableData =
|
|
|
+ res.data.tableSet.formSet.length < 1
|
|
|
+ ? this.formModalTableData
|
|
|
+ : res.data.tableSet.formSet;
|
|
|
+ this.sub_formModalTableData = JSON.parse(
|
|
|
+ JSON.stringify(this.formModalTableData)
|
|
|
+ );
|
|
|
+ this.sub_tableModalTableData = JSON.parse(
|
|
|
+ JSON.stringify(this.tableModalTableData)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
onDragDrop(a, b, table, type) {
|
|
|
if (type == 2 && (a == 0 || b == 0)) {
|
|
|
return this.$Message.warning("全选位置不可变");
|