|
@@ -1,6 +1,10 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
|
|
+ <Toptitle title="发货单">
|
|
|
|
+ <Button type="primary" ghost @click="postData"> 导出 </Button>
|
|
|
|
+ </Toptitle>
|
|
<FullPage
|
|
<FullPage
|
|
|
|
+ v-if="false"
|
|
title="发货单"
|
|
title="发货单"
|
|
:list="set_list"
|
|
:list="set_list"
|
|
@init="init"
|
|
@init="init"
|
|
@@ -69,6 +73,150 @@
|
|
<a @click="goPage(row, 3)" class="map-margin">匹配五金</a>
|
|
<a @click="goPage(row, 3)" class="map-margin">匹配五金</a>
|
|
</template>
|
|
</template>
|
|
</FullPage>
|
|
</FullPage>
|
|
|
|
+
|
|
|
|
+ <div class="page-edit" v-else>
|
|
|
|
+ <Form :label-width="120" class="form_content">
|
|
|
|
+ <FormItem label="订单编号">
|
|
|
|
+ <Input
|
|
|
|
+ clearable
|
|
|
|
+ v-model="searchFrom.order_no"
|
|
|
|
+ placeholder="请输入订单编号"
|
|
|
|
+ ></Input>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="订单状态">
|
|
|
|
+ <Select
|
|
|
|
+ clearable
|
|
|
|
+ v-model="searchFrom.sub_state"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ >
|
|
|
|
+ <Option
|
|
|
|
+ v-for="item in stateList"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ >{{ item.label }}</Option
|
|
|
|
+ >
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="紧急程度">
|
|
|
|
+ <Select
|
|
|
|
+ clearable
|
|
|
|
+ v-model="searchFrom.warning_state"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ >
|
|
|
|
+ <Option
|
|
|
|
+ v-for="item in warningList"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ :key="item.title"
|
|
|
|
+ >{{ item.title }}</Option
|
|
|
|
+ >
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="项目名称">
|
|
|
|
+ <Input
|
|
|
|
+ clearable
|
|
|
|
+ v-model="searchFrom.residential_name"
|
|
|
|
+ placeholder="请输入项目名称"
|
|
|
|
+ ></Input>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="图号">
|
|
|
|
+ <Select
|
|
|
|
+ clearable
|
|
|
|
+ v-model="searchFrom.url_number"
|
|
|
|
+ multiple
|
|
|
|
+ filterable
|
|
|
|
+ style="width: 180px"
|
|
|
|
+ >
|
|
|
|
+ <Option
|
|
|
|
+ v-for="item in url_number_list"
|
|
|
|
+ :value="item.title"
|
|
|
|
+ :key="item.title"
|
|
|
|
+ >{{ item.title }}</Option
|
|
|
|
+ >
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem label="出库日期范围">
|
|
|
|
+ <DatePicker
|
|
|
|
+ clearable
|
|
|
|
+ transfer
|
|
|
|
+ type="daterange"
|
|
|
|
+ @on-change="fromTime"
|
|
|
|
+ placement="bottom-end"
|
|
|
|
+ placeholder="请选择时间"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ ></DatePicker>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem :label-width="40">
|
|
|
|
+ <Button type="primary" @click="initData(searchFrom)">搜索</Button>
|
|
|
|
+ </FormItem>
|
|
|
|
+ </Form>
|
|
|
|
+ <div>
|
|
|
|
+ <Checkbox @on-change="showTrueChange"
|
|
|
|
+ >展示确认出库百分比不一致的数据</Checkbox
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ <Table
|
|
|
|
+ ref="table"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ @on-selection-change="selectTable"
|
|
|
|
+ border
|
|
|
|
+ :columns="tableColums"
|
|
|
|
+ :data="tableData"
|
|
|
|
+ >
|
|
|
|
+ <template slot="basicTypeSet" slot-scope="{ row }">
|
|
|
|
+ <div>
|
|
|
|
+ <span
|
|
|
|
+ v-for="item in warningList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :style="{ color: item.color }"
|
|
|
|
+ v-show="item.id == row.warning_state"
|
|
|
|
+ >{{ item.title }}</span
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot="set" slot-scope="{ row }">
|
|
|
|
+ <a class="map-margin" @click="goPage(row, 1)">详情</a>
|
|
|
|
+ <a class="map-margin" @click="goPage(row, 2)">查看异常</a>
|
|
|
|
+ <a
|
|
|
|
+ @click="confirmOutStock(row, 1)"
|
|
|
|
+ v-if="row.state == 0"
|
|
|
|
+ class="map-margin"
|
|
|
|
+ >发货完成</a
|
|
|
|
+ >
|
|
|
|
+ <!-- &&(persimissionData['确认出库'] || persimissionData.all) -->
|
|
|
|
+ <a
|
|
|
|
+ @click="confirmOutStock(row, 2)"
|
|
|
|
+ v-if="row.state == 1"
|
|
|
|
+ class="map-margin"
|
|
|
|
+ >收货完成</a
|
|
|
|
+ >
|
|
|
|
+ <!-- &&(persimissionData['确认运输'] || persimissionData.all) -->
|
|
|
|
+ <a
|
|
|
|
+ class="map-margin"
|
|
|
|
+ @click="
|
|
|
|
+ goBigScreen(row);
|
|
|
|
+ showModal = true;
|
|
|
|
+ "
|
|
|
|
+ >大屏</a
|
|
|
|
+ >
|
|
|
|
+ <a @click="goPage(row, 3)" class="map-margin">匹配五金</a>
|
|
|
|
+ </template>
|
|
|
|
+ </Table>
|
|
|
|
+ <div class="content_body_page">
|
|
|
|
+ <Page
|
|
|
|
+ :page-size-opts="[10, 20, 30, 40, 100]"
|
|
|
|
+ @on-page-size-change="changeSize"
|
|
|
|
+ @on-change="changePage"
|
|
|
|
+ :current="pageIndex"
|
|
|
|
+ show-total
|
|
|
|
+ show-elevator
|
|
|
|
+ :total="total"
|
|
|
|
+ show-sizer
|
|
|
|
+ :page-size="pageSize"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<Modal v-model="showModal" fullscreen footer-hide class="modal-bs">
|
|
<Modal v-model="showModal" fullscreen footer-hide class="modal-bs">
|
|
<template slot="header">
|
|
<template slot="header">
|
|
<div class="modal-title">
|
|
<div class="modal-title">
|
|
@@ -155,6 +303,17 @@ import { mapState } from "vuex";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ searchData: [],
|
|
|
|
+ typeList: [
|
|
|
|
+ { label: "工装", value: 1 },
|
|
|
|
+ { label: "家装", value: 0 },
|
|
|
|
+ ],
|
|
|
|
+ stateList: [
|
|
|
|
+ { label: "可以派工", value: 0 },
|
|
|
|
+ { label: "已派工", value: 1 },
|
|
|
|
+ { label: "已完成", value: 2 },
|
|
|
|
+ ],
|
|
|
|
+ searchFrom: {},
|
|
type: 0, //不展示确认出库百分比与运输百分比不一定的数据
|
|
type: 0, //不展示确认出库百分比与运输百分比不一定的数据
|
|
chooseData: [],
|
|
chooseData: [],
|
|
url_number_list: [],
|
|
url_number_list: [],
|
|
@@ -258,8 +417,8 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
tableData: [],
|
|
tableData: [],
|
|
- pageIndex: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
|
|
+ pageIndex: JSON.parse(localStorage.getItem("pageIndex")) || 1,
|
|
|
|
+ pageSize: JSON.parse(localStorage.getItem("pageSize")) || 10,
|
|
total: 0,
|
|
total: 0,
|
|
proxyObj: {},
|
|
proxyObj: {},
|
|
loading: false,
|
|
loading: false,
|
|
@@ -296,6 +455,16 @@ export default {
|
|
timer: "",
|
|
timer: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+ if (localStorage.getItem("searchFrom")) {
|
|
|
|
+ this.searchFrom = JSON.parse(localStorage.getItem("searchFrom"));
|
|
|
|
+ }
|
|
|
|
+ if (localStorage.getItem("newSearchFrom")) {
|
|
|
|
+ this.init(JSON.parse(localStorage.getItem("newSearchFrom")));
|
|
|
|
+ }else{
|
|
|
|
+ this.init()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
...mapState(["persimissionData"]),
|
|
...mapState(["persimissionData"]),
|
|
computedTable() {
|
|
computedTable() {
|
|
@@ -396,16 +565,36 @@ export default {
|
|
beforeRouteLeave(to, from, next) {
|
|
beforeRouteLeave(to, from, next) {
|
|
if (
|
|
if (
|
|
to.path == "/cms/productionorderlist/deliverylist/deliverylistDetail" ||
|
|
to.path == "/cms/productionorderlist/deliverylist/deliverylistDetail" ||
|
|
- "/cms/productionorderlist/deliverylist/checkUnusual" ||
|
|
|
|
- "/cms/productionorderlist/deliverylist/matchIronware"
|
|
|
|
|
|
+ to.path == "/cms/productionorderlist/deliverylist/checkUnusual" ||
|
|
|
|
+ to.path == "/cms/productionorderlist/deliverylist/matchIronware"
|
|
) {
|
|
) {
|
|
|
|
+ from.meta.keepAlive = false;
|
|
|
|
+ localStorage.setItem("searchFrom", JSON.stringify(this.searchFrom));
|
|
|
|
+ localStorage.setItem("pageSize", this.pageSize);
|
|
|
|
+ localStorage.setItem("pageIndex", this.pageIndex);
|
|
next();
|
|
next();
|
|
} else {
|
|
} else {
|
|
|
|
+ let form = this.searchFrom;
|
|
|
|
+ Object.keys(form).forEach((key) => (form[key] = ""));
|
|
|
|
+ localStorage.setItem("searchFrom", form);
|
|
|
|
+ localStorage.setItem("newSearchFrom", form);
|
|
|
|
+ localStorage.removeItem("searchFrom");
|
|
|
|
+ localStorage.removeItem("newSearchFrom");
|
|
|
|
+ localStorage.removeItem("pageSize");
|
|
|
|
+ localStorage.removeItem("pageIndex");
|
|
from.meta.keepAlive = false;
|
|
from.meta.keepAlive = false;
|
|
next();
|
|
next();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ initData(row) {
|
|
|
|
+ localStorage.setItem("newSearchFrom", JSON.stringify(row));
|
|
|
|
+ this.init(row);
|
|
|
|
+ },
|
|
|
|
+ fromTime(data1, data2) {
|
|
|
|
+ this.searchFrom.start_time = data1[0];
|
|
|
|
+ this.searchFrom.end_time = data1[1];
|
|
|
|
+ },
|
|
showTrueChange(e) {
|
|
showTrueChange(e) {
|
|
if (e) {
|
|
if (e) {
|
|
this.type = 1;
|
|
this.type = 1;
|
|
@@ -417,7 +606,6 @@ export default {
|
|
},
|
|
},
|
|
selectTable(e) {
|
|
selectTable(e) {
|
|
this.chooseData = e;
|
|
this.chooseData = e;
|
|
- console.log(this.chooseData);
|
|
|
|
},
|
|
},
|
|
async postData() {
|
|
async postData() {
|
|
if (this.chooseData.length == 0) {
|
|
if (this.chooseData.length == 0) {
|
|
@@ -437,16 +625,22 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
init(row) {
|
|
init(row) {
|
|
- this.pageIndex = 1;
|
|
|
|
- row.page_index = this.pageIndex;
|
|
|
|
- row.page_size = this.pageSize;
|
|
|
|
- row.type = this.type;
|
|
|
|
- this.proxyObj = JSON.parse(JSON.stringify(row));
|
|
|
|
- this.getData(this.proxyObj);
|
|
|
|
|
|
+ if (row) {
|
|
|
|
+ row.page_index = this.pageIndex;
|
|
|
|
+ row.page_size = this.pageSize;
|
|
|
|
+ row.type = this.type;
|
|
|
|
+ this.proxyObj = JSON.parse(JSON.stringify(row));
|
|
|
|
+ this.getData(this.proxyObj);
|
|
|
|
+ } else {
|
|
|
|
+ this.proxyObj = {
|
|
|
|
+ page_index: this.pageIndex,
|
|
|
|
+ page_size: this.pageSize,
|
|
|
|
+ };
|
|
|
|
+ this.getData(this.proxyObj);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
getData(row) {
|
|
getData(row) {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- console.log(row, 1);
|
|
|
|
this.axios("/api/orders_out_list", { params: row }).then((res) => {
|
|
this.axios("/api/orders_out_list", { params: row }).then((res) => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -463,7 +657,6 @@ export default {
|
|
|
|
|
|
this.set_list[4].option = data;
|
|
this.set_list[4].option = data;
|
|
this.url_number_list = data;
|
|
this.url_number_list = data;
|
|
- console.log(this.set_list[4].option);
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -496,7 +689,6 @@ export default {
|
|
content: type == 1 ? "确认发货么?" : "确认收货么?",
|
|
content: type == 1 ? "确认发货么?" : "确认收货么?",
|
|
type: "primary",
|
|
type: "primary",
|
|
then: (e) => {
|
|
then: (e) => {
|
|
- console.log(123, e);
|
|
|
|
this.axios.post(post_url, params).then((res) => {
|
|
this.axios.post(post_url, params).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$Message.success(res.msg);
|
|
this.$Message.success(res.msg);
|
|
@@ -639,6 +831,28 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.content_body_page {
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+}
|
|
|
|
+.form_content {
|
|
|
|
+ margin-top: 15px;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+}
|
|
|
|
+.nav {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: flex-end;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+}
|
|
|
|
+.page-edit {
|
|
|
|
+ // overflow: hidden;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ position: relative;
|
|
|
|
+ top: 0px;
|
|
|
|
+ height: 80%;
|
|
|
|
+}
|
|
.modal-bs {
|
|
.modal-bs {
|
|
/deep/.ivu-modal-header,
|
|
/deep/.ivu-modal-header,
|
|
/deep/.ivu-modal-body,
|
|
/deep/.ivu-modal-body,
|