|
@@ -146,9 +146,8 @@
|
|
|
<el-option label="商品编号" value="1" />
|
|
|
<el-option label="商品名称" value="2" />
|
|
|
<el-option label="业务企业编号" value="3" />
|
|
|
- <el-option label="供应商编号" value="4" />
|
|
|
- <el-option label="创建人部门" value="5" />
|
|
|
- </el-select
|
|
|
+ <el-option label="供应商编号" value="4" />
|
|
|
+ <el-option label="创建人部门" value="5" /> </el-select
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
|
|
@@ -240,8 +239,7 @@
|
|
|
>
|
|
|
<i
|
|
|
class="el-icon-view tb-icon"
|
|
|
-
|
|
|
- @click="getRouter('goodsCostDetail', scope.row.spuCode )"
|
|
|
+ @click="getRouter('goodsCostDetail', scope.row.spuCode)"
|
|
|
></i>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip
|
|
@@ -256,7 +254,6 @@
|
|
|
class="el-icon-download tb-icon"
|
|
|
@click="showDonlineDlg(scope.row.spuCode)"
|
|
|
></i>
|
|
|
-
|
|
|
</el-tooltip>
|
|
|
<el-tooltip
|
|
|
v-if="
|
|
@@ -361,18 +358,22 @@
|
|
|
class="demo-ruleForm"
|
|
|
label-width="80px"
|
|
|
>
|
|
|
-
|
|
|
- <el-form-item label="下线原因" prop="offline_remark">
|
|
|
+ <el-form-item label="下线原因" prop="offline_reason">
|
|
|
<el-select
|
|
|
- v-model="donline_form.offline_remark"
|
|
|
+ v-model="donline_form.offline_reason"
|
|
|
placeholder="请选择下线原因"
|
|
|
>
|
|
|
- <el-option :label="item.label" :value="item.value" v-for="item in donline_formStOps" :key="item.value"></el-option>
|
|
|
+ <el-option
|
|
|
+ :label="item.result"
|
|
|
+ :value="item.result_code"
|
|
|
+ v-for="item in donline_formStOps"
|
|
|
+ :key="item.result_code"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="下线备注" prop="offline_reason">
|
|
|
+ <el-form-item label="下线备注" prop="offline_remark">
|
|
|
<el-input
|
|
|
- v-model="donline_form.offline_reason"
|
|
|
+ v-model="donline_form.offline_remark"
|
|
|
type="textarea"
|
|
|
placeholder="请输入下线备注"
|
|
|
autocomplete="off"
|
|
@@ -432,18 +433,19 @@ export default {
|
|
|
};
|
|
|
return {
|
|
|
dialogFormVisible: false,
|
|
|
- donline_formStOps:[
|
|
|
- {value:"1",label:"库存不足"},
|
|
|
- {value:"2",label:"商品原因"},
|
|
|
- ],
|
|
|
+ donline_formStOps: [],
|
|
|
donline_form: {
|
|
|
offline_reason: "",
|
|
|
offline_remark: "",
|
|
|
spuCode: "",
|
|
|
},
|
|
|
donline_rules: {
|
|
|
- offline_reason: [{ validator: validate, required: true, trigger: "blur" }],
|
|
|
- offline_remark: [{ validator: validate, required: true, trigger: "change" }],
|
|
|
+ offline_reason: [
|
|
|
+ { validator: validate, required: true, trigger: "blur" },
|
|
|
+ ],
|
|
|
+ offline_remark: [
|
|
|
+ { validator: validate, required: true, trigger: "blur" },
|
|
|
+ ],
|
|
|
},
|
|
|
statusList: [
|
|
|
{
|
|
@@ -543,53 +545,69 @@ export default {
|
|
|
const { back } = this.$route.query;
|
|
|
if (back) {
|
|
|
this.parmValue = JSON.parse(back);
|
|
|
- console.log(this.parmValue)
|
|
|
- const {page,size}=this.parmValue;
|
|
|
+ console.log(this.parmValue);
|
|
|
+ const { page, size } = this.parmValue;
|
|
|
// this.parmValue.start = start || last_start;
|
|
|
// this.parmValue.end = end || last_end;
|
|
|
- if(this.parmValue.brandid.length>0){
|
|
|
- this.brandid = [this.parmValue.brandid] ;
|
|
|
+ if (this.parmValue.brandid.length > 0) {
|
|
|
+ this.brandid = [this.parmValue.brandid];
|
|
|
}
|
|
|
-
|
|
|
- this.pageInfo= {
|
|
|
+
|
|
|
+ this.pageInfo = {
|
|
|
size: size,
|
|
|
curr: page,
|
|
|
total: 0,
|
|
|
- }
|
|
|
+ };
|
|
|
//多选条件
|
|
|
- this.select = this.parmValue.select;
|
|
|
- // this.sselect = this.parmValue.sselect;
|
|
|
- this.sinput = this.parmValue.sinput
|
|
|
-
|
|
|
- }else{
|
|
|
- this.select = "1";
|
|
|
+ this.select = this.parmValue.select;
|
|
|
+ // this.sselect = this.parmValue.sselect;
|
|
|
+ this.sinput = this.parmValue.sinput;
|
|
|
+ } else {
|
|
|
+ this.select = "1";
|
|
|
// this.sselect = "创建时间"
|
|
|
}
|
|
|
this.select = "1";
|
|
|
this.supplierNo = [];
|
|
|
-
|
|
|
+
|
|
|
this.searchList();
|
|
|
},
|
|
|
methods: {
|
|
|
- getRouter(toRouter, queryId){
|
|
|
+ // 获取异常原因下拉列表
|
|
|
+ async getresultlist() {
|
|
|
+ const res = await asyncRequest.resultlist({
|
|
|
+ page: 1,
|
|
|
+ size: 100,
|
|
|
+ type: "8",
|
|
|
+ status: "3",
|
|
|
+ });
|
|
|
+ if (res && res.code === 0 && res.data) {
|
|
|
+ const { list } = res.data;
|
|
|
+ this.donline_formStOps = list;
|
|
|
+ } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getRouter(toRouter, queryId) {
|
|
|
if (toRouter && queryId) {
|
|
|
let model = {
|
|
|
id: queryId,
|
|
|
- type: 'view',
|
|
|
+ type: "view",
|
|
|
};
|
|
|
|
|
|
//有多选框的条件
|
|
|
- this.parmValue.select = this.select ;
|
|
|
+ this.parmValue.select = this.select;
|
|
|
// this.parmValue.sselect = this.sselect ;
|
|
|
- this.parmValue.sinput= this.sinput;
|
|
|
+ this.parmValue.sinput = this.sinput;
|
|
|
//
|
|
|
- console.log(this.parmValue)
|
|
|
- let routerModel = {
|
|
|
+ console.log(this.parmValue);
|
|
|
+ let routerModel = {
|
|
|
options: JSON.parse(JSON.stringify(this.parmValue)),
|
|
|
router: this.$route.path,
|
|
|
};
|
|
|
model.preModel = JSON.stringify(routerModel);
|
|
|
-
|
|
|
+
|
|
|
this.routeGoto(toRouter, model);
|
|
|
} else {
|
|
|
this.$message.warning("暂未找到相关流程!");
|
|
@@ -597,7 +615,7 @@ export default {
|
|
|
},
|
|
|
restSearch() {
|
|
|
this.select = "1";
|
|
|
- this.sinput = ""
|
|
|
+ this.sinput = "";
|
|
|
this.supplierNo = [];
|
|
|
this.brandid = [];
|
|
|
// 表格 - 分页
|
|
@@ -670,7 +688,6 @@ export default {
|
|
|
},
|
|
|
//商品品牌选择
|
|
|
async brandidsearchChange(e) {
|
|
|
-
|
|
|
const { id, code, label } = e;
|
|
|
if (id) {
|
|
|
this.brandid = [id];
|
|
@@ -827,6 +844,7 @@ export default {
|
|
|
this.tableData = [];
|
|
|
this.pageInfo.total = 0;
|
|
|
}
|
|
|
+ this.getresultlist();
|
|
|
this.loading = false;
|
|
|
},
|
|
|
//商品分类选择
|
|
@@ -857,7 +875,7 @@ export default {
|
|
|
}
|
|
|
this.showModel = true;
|
|
|
},
|
|
|
-//点击下线
|
|
|
+ //点击下线
|
|
|
async showDonlineDlg(spuCode) {
|
|
|
this.dialogFormVisible = true;
|
|
|
this.donline_form.spuCode = spuCode;
|
|
@@ -876,44 +894,51 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- async get_donline(spuCode){
|
|
|
- await this.$confirm(`本次操作会下线本条SKU下的所有商品`, "提示",{
|
|
|
+ async get_donline(spuCode) {
|
|
|
+ await this.$confirm(`本次操作会下线本条SKU下的所有商品`, "提示", {
|
|
|
// cancelButtonClass:"lzx_BtnErr",
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
center: true,
|
|
|
- }).then(async()=>{
|
|
|
- await this.$confirm(`确定要下线商品?`, {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
})
|
|
|
.then(async () => {
|
|
|
- this.loading = true;
|
|
|
- const model = this.donline_form;
|
|
|
- const res = await asyncRequest.goodupoffline(model);
|
|
|
- if (res && res.code === 0) {
|
|
|
- this.loading = false;
|
|
|
- this.$notify.success({
|
|
|
- title: res.message,
|
|
|
- message: "",
|
|
|
+ await this.$confirm(`确定要下线商品?`, {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ this.loading = true;
|
|
|
+ const model = this.donline_form;
|
|
|
+ const res = await asyncRequest.goodupoffline(model);
|
|
|
+ if (res && res.code === 0) {
|
|
|
+ this.loading = false;
|
|
|
+ this.$notify.success({
|
|
|
+ title: res.message,
|
|
|
+ message: "",
|
|
|
+ });
|
|
|
+ await this.searchList();
|
|
|
+ } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.loading = false;
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ this.donline_form = {
|
|
|
+ offline_reason: "",
|
|
|
+ offline_remark: "",
|
|
|
+ skuCode: "",
|
|
|
+ };
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ console.log("取消1");
|
|
|
});
|
|
|
- await this.searchList();
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
- await this.logout();
|
|
|
- } else {
|
|
|
- this.loading = false;
|
|
|
- this.$message.warning(res.message);
|
|
|
- }
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- console.log("取消1");
|
|
|
+ .catch(async () => {
|
|
|
+ console.log("取消");
|
|
|
});
|
|
|
- }).catch(async()=>{
|
|
|
- console.log("取消");
|
|
|
- })
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|