|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="newApply pagePadding">
|
|
|
- {{ ruleForm }}
|
|
|
+ {{ ruleForm }}id{{ id }}
|
|
|
<div
|
|
|
v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
|
|
|
>
|
|
@@ -23,16 +23,7 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="12">
|
|
|
- <el-form-item label="商品数量" prop="goods_name">
|
|
|
- <el-input
|
|
|
- style="width: 100%"
|
|
|
- v-model="ruleForm.goods_name"
|
|
|
- placeholder="请输入内容"
|
|
|
- :size="searchSize"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col> -->
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="采购数量" prop="goods_num">
|
|
|
<el-input
|
|
@@ -78,86 +69,6 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <!-- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="收件人" prop="consignee">
|
|
|
- <search-account
|
|
|
- :value="ruleForm.consignee"
|
|
|
- :size="searchSize"
|
|
|
- style="width: 100%"
|
|
|
- @searchChange="handleResignName"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="电话" prop="mobile">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.mobile"
|
|
|
- placeholder="请输入电话"
|
|
|
- :size="searchSize"
|
|
|
- style="width: 100%"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row> -->
|
|
|
- <!-- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="收货地址" prop="receivedArea">
|
|
|
- <select-area
|
|
|
- :value="ruleForm.receivedArea"
|
|
|
- :size="searchSize"
|
|
|
- :placeholder="'请输入收货地址'"
|
|
|
- style="width: 100%"
|
|
|
- @selectChange="selectArea"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="详细地址" prop="detailArea">
|
|
|
- <el-input
|
|
|
- :size="searchSize"
|
|
|
- v-model="ruleForm.detailArea"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="详细地址"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row> -->
|
|
|
- <!-- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="物流单号" prop="express_number">
|
|
|
- <el-input
|
|
|
- :size="searchSize"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="物流单号"
|
|
|
- v-model="ruleForm.express_number"
|
|
|
- /> </el-form-item
|
|
|
- ></el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="发货时间" prop="send_out_time">
|
|
|
- <el-date-picker
|
|
|
- style="width: 100%"
|
|
|
- :size="searchSize"
|
|
|
- v-model="ruleForm.send_out_time"
|
|
|
- value-format="timestamp"
|
|
|
- type="date"
|
|
|
- placeholder="选择日期"
|
|
|
- @change="selectOutTime"
|
|
|
- >
|
|
|
- </el-date-picker> </el-form-item
|
|
|
- ></el-col>
|
|
|
- </el-row> -->
|
|
|
-
|
|
|
- <!-- <el-form-item>
|
|
|
- <el-col :span="24" style="text-align: right; margin-top: 10px">
|
|
|
- <el-button type="primary" @click="save('ruleForm')"
|
|
|
- >保 存
|
|
|
- </el-button>
|
|
|
- <el-button type="warning" @click="submitForm('ruleForm')"
|
|
|
- >保 存 并 发 起 流 程
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- </el-form-item> -->
|
|
|
</el-form>
|
|
|
<el-divider content-position="center">采购反馈</el-divider>
|
|
|
<el-form
|
|
@@ -248,7 +159,6 @@ import { isMobile, isAlphanumeric } from "@/utils/validate";
|
|
|
export default {
|
|
|
name: "allotFlow",
|
|
|
mixins: [mixinPage, resToken],
|
|
|
-
|
|
|
computed: {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
powers() {
|
|
@@ -289,6 +199,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ id: "", //路由传过来的id
|
|
|
inTime: "",
|
|
|
goTime: "",
|
|
|
ruleForm: {
|
|
@@ -461,6 +372,10 @@ export default {
|
|
|
parmValue: {},
|
|
|
};
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.id = this.$route.query.id;
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 选择省市区
|
|
|
selectArea(e) {
|
|
@@ -529,164 +444,174 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- },
|
|
|
- restSearch() {
|
|
|
- //重置入参
|
|
|
- this.parmValue = {};
|
|
|
- // this.searchList();
|
|
|
- },
|
|
|
|
|
|
- openModal(id, isDetail, sitem) {
|
|
|
- this.showModel = isDetail;
|
|
|
- this.modelId = id;
|
|
|
- this.isDetail = isDetail;
|
|
|
- this.sitem = sitem;
|
|
|
- },
|
|
|
- async deleteById(id, status) {
|
|
|
- // await this.$confirm("确定要删除?", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // cancelButtonText: "取消",
|
|
|
- // type: "warning",
|
|
|
- // })
|
|
|
- // .then(async () => {
|
|
|
- // const model = {
|
|
|
- // id: id,
|
|
|
- // status: status === "1" ? "0" : "1",
|
|
|
- // };
|
|
|
- // const res = await asyncRequest.status(model);
|
|
|
- // if (res && res.code === 0) {
|
|
|
- // this.$notify.success({
|
|
|
- // title: "删除成功",
|
|
|
- // message: "",
|
|
|
- // });
|
|
|
- // this.searchList();
|
|
|
- // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
- // await this.logout();
|
|
|
- // } else {
|
|
|
- // this.$message.warning(res.message);
|
|
|
- // }
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // console.log("取消");
|
|
|
- // });
|
|
|
- },
|
|
|
- async searchList() {
|
|
|
- // this.loading = true;
|
|
|
- // const res = await asyncRequest.list(this.parmValue);
|
|
|
- // if (res && res.code === 0 && res.data) {
|
|
|
- // this.tableData = res.data.list;
|
|
|
- // this.pageInfo.total = Number(res.data.count);
|
|
|
- // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
- // await this.logout();
|
|
|
- // } else {
|
|
|
- // this.tableData = [];
|
|
|
- // this.pageInfo.total = 0;
|
|
|
- // }
|
|
|
- // this.loading = false;
|
|
|
- },
|
|
|
+ restSearch() {
|
|
|
+ //重置入参
|
|
|
+ this.parmValue = {};
|
|
|
+ // this.searchList();
|
|
|
+ },
|
|
|
|
|
|
- async statusConfirm(id, status) {
|
|
|
- // let str = status === "1" ? "禁用" : "启用";
|
|
|
- // await this.$confirm("确定要改为" + str + "?", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // cancelButtonText: "取消",
|
|
|
- // type: "warning",
|
|
|
- // })
|
|
|
- // .then(async () => {
|
|
|
- // this.loading = true;
|
|
|
- // const model = {
|
|
|
- // id: id,
|
|
|
- // status: status === "1" ? "0" : "1",
|
|
|
- // };
|
|
|
- // const res = await asyncRequest.status(model);
|
|
|
- // if (res && res.code === 0) {
|
|
|
- // this.loading = false;
|
|
|
- // this.$notify.success({
|
|
|
- // title: "状态修改成功!",
|
|
|
- // message: "",
|
|
|
- // });
|
|
|
- // await this.searchList();
|
|
|
- // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
- // await this.logout();
|
|
|
- // } else {
|
|
|
- // this.$message.warning(res.message);
|
|
|
- // }
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // console.log("取消");
|
|
|
- // });
|
|
|
- },
|
|
|
- async stockName(isShowModal = false) {
|
|
|
- //获取多级仓库名称的方法
|
|
|
- const res = await asyncRequest.listAll(this.parmValue);
|
|
|
- console.log(res.data);
|
|
|
- // this.openModal("005", true);
|
|
|
- // console.log(this.selectStock_go);
|
|
|
- // console.log(this.selectStock_in);
|
|
|
- // this.options = res.data;
|
|
|
- // console.log(this.options);
|
|
|
- let arr = res.data;
|
|
|
- // console.log(arr);
|
|
|
- arr.forEach((ele) => {
|
|
|
- //重新封装后台传递来的数据,转换格式
|
|
|
- let item = {
|
|
|
- value: ele.id,
|
|
|
- label: ele.name,
|
|
|
- children: [],
|
|
|
- };
|
|
|
- ele.child.forEach((elem) => {
|
|
|
- let model = {
|
|
|
- value: elem.id,
|
|
|
- label: elem.name,
|
|
|
- };
|
|
|
- item.children.push(model);
|
|
|
- });
|
|
|
- this.options.push(item);
|
|
|
- });
|
|
|
- this.options.forEach((ele) => {
|
|
|
- //从数据表中筛选出我们要用的数据
|
|
|
- if (ele.value === this.selectStock_go[0]) {
|
|
|
- ele.children.forEach((elem) => {
|
|
|
- if (elem.value === this.selectStock_go[1]) {
|
|
|
- this.stock_go = ele.label + "/" + elem.label;
|
|
|
- }
|
|
|
- });
|
|
|
+ async deleteById(id, status) {
|
|
|
+ // await this.$confirm("确定要删除?", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning",
|
|
|
+ // })
|
|
|
+ // .then(async () => {
|
|
|
+ // const model = {
|
|
|
+ // id: id,
|
|
|
+ // status: status === "1" ? "0" : "1",
|
|
|
+ // };
|
|
|
+ // const res = await asyncRequest.status(model);
|
|
|
+ // if (res && res.code === 0) {
|
|
|
+ // this.$notify.success({
|
|
|
+ // title: "删除成功",
|
|
|
+ // message: "",
|
|
|
+ // });
|
|
|
+ // this.searchList();
|
|
|
+ // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ // await this.logout();
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning(res.message);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // console.log("取消");
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ async searchList() {
|
|
|
+ this.loading = true;
|
|
|
+ const res = await asyncRequest.detail({ id: this.id });
|
|
|
+ if (res && res.code === 0 && res.data) {
|
|
|
+ console.log(res);
|
|
|
+ let {
|
|
|
+ bk_code,
|
|
|
+ apply_id,
|
|
|
+ apply_name,
|
|
|
+ good_code,
|
|
|
+ good_name,
|
|
|
+ good_num,
|
|
|
+ good_type_code,
|
|
|
+ wsm_code,
|
|
|
+ lasttime,
|
|
|
+ wsm_name,
|
|
|
+ status,
|
|
|
+ is_del,
|
|
|
+ } = res.data;
|
|
|
+ // this.tableData = res.data.list;
|
|
|
+ // this.pageInfo.total = Number(res.data.count);
|
|
|
+ } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ this.pageInfo.total = 0;
|
|
|
}
|
|
|
- if (ele.value === this.selectStock_in[0]) {
|
|
|
- ele.children.forEach((elem) => {
|
|
|
- if (elem.value === this.selectStock_in[1]) {
|
|
|
- this.stock_in = ele.label + "/" + elem.label;
|
|
|
- }
|
|
|
+ this.loading = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ async statusConfirm(id, status) {
|
|
|
+ // let str = status === "1" ? "禁用" : "启用";
|
|
|
+ // await this.$confirm("确定要改为" + str + "?", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // type: "warning",
|
|
|
+ // })
|
|
|
+ // .then(async () => {
|
|
|
+ // this.loading = true;
|
|
|
+ // const model = {
|
|
|
+ // id: id,
|
|
|
+ // status: status === "1" ? "0" : "1",
|
|
|
+ // };
|
|
|
+ // const res = await asyncRequest.status(model);
|
|
|
+ // if (res && res.code === 0) {
|
|
|
+ // this.loading = false;
|
|
|
+ // this.$notify.success({
|
|
|
+ // title: "状态修改成功!",
|
|
|
+ // message: "",
|
|
|
+ // });
|
|
|
+ // await this.searchList();
|
|
|
+ // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ // await this.logout();
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning(res.message);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // console.log("取消");
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ async stockName(isShowModal = false) {
|
|
|
+ //获取多级仓库名称的方法
|
|
|
+ const res = await asyncRequest.listAll(this.parmValue);
|
|
|
+ console.log(res.data);
|
|
|
+ // this.openModal("005", true);
|
|
|
+ // console.log(this.selectStock_go);
|
|
|
+ // console.log(this.selectStock_in);
|
|
|
+ // this.options = res.data;
|
|
|
+ // console.log(this.options);
|
|
|
+ let arr = res.data;
|
|
|
+ // console.log(arr);
|
|
|
+ arr.forEach((ele) => {
|
|
|
+ //重新封装后台传递来的数据,转换格式
|
|
|
+ let item = {
|
|
|
+ value: ele.id,
|
|
|
+ label: ele.name,
|
|
|
+ children: [],
|
|
|
+ };
|
|
|
+ ele.child.forEach((elem) => {
|
|
|
+ let model = {
|
|
|
+ value: elem.id,
|
|
|
+ label: elem.name,
|
|
|
+ };
|
|
|
+ item.children.push(model);
|
|
|
});
|
|
|
+ this.options.push(item);
|
|
|
+ });
|
|
|
+ this.options.forEach((ele) => {
|
|
|
+ //从数据表中筛选出我们要用的数据
|
|
|
+ if (ele.value === this.selectStock_go[0]) {
|
|
|
+ ele.children.forEach((elem) => {
|
|
|
+ if (elem.value === this.selectStock_go[1]) {
|
|
|
+ this.stock_go = ele.label + "/" + elem.label;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (ele.value === this.selectStock_in[0]) {
|
|
|
+ ele.children.forEach((elem) => {
|
|
|
+ if (elem.value === this.selectStock_in[1]) {
|
|
|
+ this.stock_in = ele.label + "/" + elem.label;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (this.selectStock_in != "" || this.selectStock_go != "") {
|
|
|
+ console.log("选择了一个项目");
|
|
|
+ this.openModal("005", isShowModal);
|
|
|
}
|
|
|
- });
|
|
|
- if (this.selectStock_in != "" || this.selectStock_go != "") {
|
|
|
- console.log("选择了一个项目");
|
|
|
- this.openModal("005", isShowModal);
|
|
|
- }
|
|
|
- console.log(this.stock_go);
|
|
|
- console.log(this.stock_in);
|
|
|
- // if(){
|
|
|
+ console.log(this.stock_go);
|
|
|
+ console.log(this.stock_in);
|
|
|
+ // if(){
|
|
|
|
|
|
- // }
|
|
|
- // console.log(this.pageInfo.total);
|
|
|
+ // }
|
|
|
+ // console.log(this.pageInfo.total);
|
|
|
|
|
|
- this.compareStock(); //比较出库仓库和入库仓库是否相同
|
|
|
- },
|
|
|
+ this.compareStock(); //比较出库仓库和入库仓库是否相同
|
|
|
+ },
|
|
|
|
|
|
- compareStock() {
|
|
|
- //比较出库仓库和入库仓库是否相同
|
|
|
- if (
|
|
|
- this.stock_go === this.stock_in &&
|
|
|
- this.stock_go !== "" &&
|
|
|
- this.stock_go != ""
|
|
|
- ) {
|
|
|
- console.log("出库仓库和入库仓库相同");
|
|
|
- this.$message({
|
|
|
- message: "出库仓库不能和入库仓库相同",
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- }
|
|
|
+ compareStock() {
|
|
|
+ //比较出库仓库和入库仓库是否相同
|
|
|
+ if (
|
|
|
+ this.stock_go === this.stock_in &&
|
|
|
+ this.stock_go !== "" &&
|
|
|
+ this.stock_go != ""
|
|
|
+ ) {
|
|
|
+ console.log("出库仓库和入库仓库相同");
|
|
|
+ this.$message({
|
|
|
+ message: "出库仓库不能和入库仓库相同",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|