|
@@ -92,10 +92,10 @@
|
|
|
"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in statusList"
|
|
|
- :key="'status' + item.code"
|
|
|
+ v-for="item in options8"
|
|
|
+ :key="'status' + item.id"
|
|
|
:label="item.name"
|
|
|
- :value="item.code"
|
|
|
+ :value="item.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
@@ -124,14 +124,14 @@
|
|
|
<el-col :span="4" style="width: 513px; padding: 0 0 0 10px">
|
|
|
<el-input
|
|
|
:size="searchSize"
|
|
|
- v-model="parmValue.name"
|
|
|
+ v-model="sinput"
|
|
|
:maxlength="40"
|
|
|
@blur="
|
|
|
pageInfo.curr = 1;
|
|
|
parmValue.page = 1;
|
|
|
searchList();
|
|
|
"
|
|
|
- placeholder="单位名称"
|
|
|
+ placeholder="关键字"
|
|
|
><el-select
|
|
|
v-model="select"
|
|
|
slot="prepend"
|
|
@@ -139,8 +139,13 @@
|
|
|
style="width: 140px"
|
|
|
placeholder="关键字类型"
|
|
|
>
|
|
|
- <el-option label="商品编号" value="1" />
|
|
|
- <el-option label="商品名称" value="2" /> </el-select
|
|
|
+ <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-option label="平台商品编号" value="6" />
|
|
|
+ <el-option label="创建人" value="7" /> </el-select
|
|
|
></el-input>
|
|
|
</el-col>
|
|
|
<el-col
|
|
@@ -180,8 +185,8 @@
|
|
|
:size="tablebtnSize"
|
|
|
:type="scope.row.status == '0' ? '' : 'warning'"
|
|
|
v-text="
|
|
|
- (statusList.find((item) => item.code == scope.row.status) || {})
|
|
|
- .name || '--'
|
|
|
+ (options8.find((item) => item.id == scope.row.status) || {}).name ||
|
|
|
+ '--'
|
|
|
"
|
|
|
></el-tag>
|
|
|
</template>
|
|
@@ -231,8 +236,7 @@ import asyncRequest from "@/apis/service/goodStore/goodsOnline";
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-
|
|
|
-import { listCol, options1 } from "./columns";
|
|
|
+import { listCol, options1, options8 } from "./columns";
|
|
|
export default {
|
|
|
name: "goodsOnline",
|
|
|
mixins: [mixinPage, resToken],
|
|
@@ -253,26 +257,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- statusList: [
|
|
|
- {
|
|
|
- code: "0",
|
|
|
- name: "新建待审核",
|
|
|
- },
|
|
|
- {
|
|
|
- code: "1",
|
|
|
- name: "审核通过",
|
|
|
- },
|
|
|
- {
|
|
|
- code: "2",
|
|
|
- name: "基础修改待审核",
|
|
|
- },
|
|
|
- {
|
|
|
- code: "3",
|
|
|
- name: "成本修改待审核",
|
|
|
- },
|
|
|
- ],
|
|
|
-
|
|
|
options1: options1,
|
|
|
+ options8: options8,
|
|
|
loading: false,
|
|
|
parmValue: {
|
|
|
good_name: "", //商品名称
|
|
@@ -280,12 +266,16 @@ export default {
|
|
|
cat_id: "", //商品分类
|
|
|
start: "", //开始日期
|
|
|
end: "", //结束日期
|
|
|
- platform_code:"",//平台编码
|
|
|
- is_stock:"",//是否库存品
|
|
|
+ platform_code: "", //平台编码
|
|
|
+ is_stock: "", //是否库存品
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
-
|
|
|
- status: "", //状态
|
|
|
+ supplierNo: "", //供应商编号
|
|
|
+ good_type: "", //是否定制
|
|
|
+ brand_id: "", //品牌
|
|
|
+ companyNo: "", //业务企业编号
|
|
|
+ exam_status: "", //审核状态
|
|
|
+ plat_code: "", //平台商品编号
|
|
|
creater: "", //
|
|
|
},
|
|
|
|
|
@@ -305,20 +295,19 @@ export default {
|
|
|
},
|
|
|
// 表格 - 列参数
|
|
|
columns: listCol,
|
|
|
- supplierNo: [],
|
|
|
cat_id: [],
|
|
|
brandid: [],
|
|
|
+ select: "1",
|
|
|
+ sinput: "",
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.supplierNo = [];
|
|
|
this.cat_id = [];
|
|
|
this.brandid = [];
|
|
|
this.searchList();
|
|
|
},
|
|
|
methods: {
|
|
|
restSearch() {
|
|
|
- this.supplierNo = [];
|
|
|
this.cat_id = [];
|
|
|
this.brandid = [];
|
|
|
// 表格 - 分页
|
|
@@ -328,41 +317,25 @@ export default {
|
|
|
total: 0,
|
|
|
};
|
|
|
this.parmValue = {
|
|
|
+ good_name: "", //商品名称
|
|
|
+ spucodecode: "", //商品编号
|
|
|
+ cat_id: "", //商品分类
|
|
|
+ start: "", //开始日期
|
|
|
+ end: "", //结束日期
|
|
|
+ platform_code: "", //平台编码
|
|
|
+ is_stock: "", //是否库存品
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
- start: "",
|
|
|
- end: "",
|
|
|
- status: "",
|
|
|
- creater: "",
|
|
|
+ supplierNo: "", //供应商编号
|
|
|
+ good_type: "", //是否定制
|
|
|
+ brand_id: "", //品牌
|
|
|
+ companyNo: "", //业务企业编号
|
|
|
+ exam_status: "", //审核状态
|
|
|
+ plat_code: "", //平台商品编号
|
|
|
+ creater: "", //
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
|
- //供应商选择
|
|
|
- async supplierNosearchChange(e) {
|
|
|
- console.log(e);
|
|
|
- const { id, code, label } = e;
|
|
|
- if (id) {
|
|
|
- this.supplierNo = [code];
|
|
|
- } else {
|
|
|
- this.supplierNo = [code];
|
|
|
- }
|
|
|
- this.parmValue.supplierNo = this.supplierNo.toString();
|
|
|
- this.pageInfo.curr = 1;
|
|
|
- this.parmValue.page = 1;
|
|
|
- await this.searchList();
|
|
|
- },
|
|
|
- //业务企业选择
|
|
|
- async company_idsearchChange(e) {
|
|
|
- const { id, code, label } = e;
|
|
|
- if (id) {
|
|
|
- this.parmValue.company_id = code;
|
|
|
- } else {
|
|
|
- this.parmValue.company_id = "";
|
|
|
- }
|
|
|
- this.pageInfo.curr = 1;
|
|
|
- this.parmValue.page = 1;
|
|
|
- await this.searchList();
|
|
|
- },
|
|
|
//商品品牌选择
|
|
|
async brandidsearchChange(e) {
|
|
|
const { id, code, label } = e;
|
|
@@ -371,7 +344,7 @@ export default {
|
|
|
} else {
|
|
|
this.brandid = [];
|
|
|
}
|
|
|
- this.ruleForm.brandid = this.this.brandid.toString();
|
|
|
+ this.parmValue.brand_id = this.brandid.toString();
|
|
|
this.pageInfo.curr = 1;
|
|
|
this.parmValue.page = 1;
|
|
|
await this.searchList();
|
|
@@ -455,6 +428,15 @@ export default {
|
|
|
// 刷新表格
|
|
|
async searchList() {
|
|
|
this.loading = true;
|
|
|
+ let model = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
+ model.good_name = this.select === "1" ? this.sinput : ""; //商品名称
|
|
|
+ model.spucodecode = this.select === "1" ? this.sinput : ""; //商品编号
|
|
|
+ model.platform_code = this.select === "1" ? this.sinput : ""; //平台编码
|
|
|
+ model.supplierNo = this.select === "1" ? this.sinput : ""; //供应商编号
|
|
|
+ model.companyNo = this.select === "1" ? this.sinput : ""; //业务企业编号
|
|
|
+ model.exam_status = this.select === "1" ? this.sinput : ""; //审核状态
|
|
|
+ model.plat_code = this.select === "1" ? this.sinput : ""; //平台商品编号
|
|
|
+ model.creater = this.select === "1" ? this.sinput : ""; //
|
|
|
const res = await asyncRequest.list(this.parmValue);
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
this.tableData = res.data.list;
|
|
@@ -476,9 +458,9 @@ export default {
|
|
|
},
|
|
|
//商品分类选择
|
|
|
async goods_class_change(e) {
|
|
|
- const { value } = e;
|
|
|
- this.cat_id = value || [];
|
|
|
- this.pageInfo.cat_id = this.cat_id.toString();
|
|
|
+ this.cat_id = e;
|
|
|
+ this.parmValue.cat_id =
|
|
|
+ this.cat_id.length === 0 ? "" : this.cat_id[this.cat_id.length - 1];
|
|
|
this.pageInfo.curr = 1;
|
|
|
this.parmValue.page = 1;
|
|
|
await this.searchList();
|