|
@@ -25,7 +25,7 @@
|
|
|
<template #table-header="{}">
|
|
|
<div style="width: 100%">
|
|
|
<el-row style="padding: 0 0 10px 80px">
|
|
|
- <el-col :span="6" style="width: 301px">
|
|
|
+ <el-col :span="6" style="width: 303px">
|
|
|
<period-date-picker
|
|
|
:type="1"
|
|
|
:width="'135px'"
|
|
@@ -35,8 +35,18 @@
|
|
|
@timeReturned="handleTime"
|
|
|
/>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="6" style="width: 310px">
|
|
|
+ <el-col :span="4" style="width: 135px">
|
|
|
+ <search-brand
|
|
|
+ :value="brandid"
|
|
|
+ :disabled="false"
|
|
|
+ :size="'mini'"
|
|
|
+ :isDetail="true"
|
|
|
+ :names="parmValue.supplierName"
|
|
|
+ :placeholder="'商品品牌'"
|
|
|
+ @searchChange="brandidsearchChange"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="width: 310px; padding: 0 0 0 10px">
|
|
|
<good-class
|
|
|
:value="parmValue.cat_id"
|
|
|
@handleChange="goods_class_change"
|
|
@@ -48,14 +58,11 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
|
|
|
- <el-button type="primary" :size="searchSize" @click="searchList">
|
|
|
- 刷新
|
|
|
- </el-button>
|
|
|
+ <el-button type="primary" :size="searchSize" @click="searchList">刷新</el-button>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
|
|
|
- <el-button type="warning" :size="searchSize" @click="restSearch">
|
|
|
- 重置
|
|
|
- </el-button>
|
|
|
+ <el-button type="warning" :size="searchSize" @click="restSearch">重置</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
@@ -104,12 +111,61 @@
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="4" style="width: 320px; padding: 0 0 0 10px">
|
|
|
- <search-work-company
|
|
|
- :value="parmValue.companyNo"
|
|
|
- :placeholder="'业务公司'"
|
|
|
+ <el-col :span="4" style="width: 135px;margin-left:10px">
|
|
|
+ <el-select
|
|
|
+ v-model="parmValue.is_stock"
|
|
|
+ size="mini"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="商品类型"
|
|
|
+ clearable
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="opt in isStockOptions"
|
|
|
+ :key="opt.value"
|
|
|
+ :value="opt.value"
|
|
|
+ :label="opt.label"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <!-- <el-col :span="4" style="width: 147px; padding: 0 0 0 10px">
|
|
|
+ <el-select
|
|
|
+ v-model="parmValue.has_account"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
:size="searchSize"
|
|
|
- @searchChange="companyNosearchChange"
|
|
|
+ placeholder="供应商账号"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in has_account_list"
|
|
|
+ :key="'status' + item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>-->
|
|
|
+ <el-col :span="3" style="margin: 0 10px">
|
|
|
+ <search-supplier
|
|
|
+ :size="'mini'"
|
|
|
+ style="width: 300px"
|
|
|
+ :value="supplierNo"
|
|
|
+ :disabled="false"
|
|
|
+ :placeholder="'供应商名称'"
|
|
|
+ :names="''"
|
|
|
+ :isDetail="false"
|
|
|
+ :noDisabled="true"
|
|
|
+ @searchChange="supplierChange"
|
|
|
/>
|
|
|
</el-col>
|
|
|
|
|
@@ -117,47 +173,30 @@
|
|
|
:span="3"
|
|
|
class="fr"
|
|
|
style="width: 66px; padding: 0 0 0 10px"
|
|
|
- v-if="powers.some((i) => i == '003')"
|
|
|
+ v-if="powers.some((i) => i == '003') && !isSupertube"
|
|
|
>
|
|
|
<el-button
|
|
|
:size="searchSize"
|
|
|
type="success"
|
|
|
style="float: right"
|
|
|
@click="handleCreate"
|
|
|
- >
|
|
|
- 添加
|
|
|
- </el-button>
|
|
|
+ >添加</el-button>
|
|
|
</el-col>
|
|
|
- <!-- <el-col
|
|
|
+ <el-col
|
|
|
:span="3"
|
|
|
class="fr"
|
|
|
style="width: 110px; padding: 0 0 0 10px"
|
|
|
- v-if="powers.some((i) => i == '055')"
|
|
|
+ v-if="powers.some((i) => i == '055') && !isSupertube"
|
|
|
>
|
|
|
- <el-button
|
|
|
- :size="searchSize"
|
|
|
- type="warning"
|
|
|
- style="float: right"
|
|
|
- @click="add_online"
|
|
|
- >
|
|
|
+ <el-button :size="searchSize" type="warning" style="float: right" @click="add_online">
|
|
|
<i class="el-icon-circle-plus-outline"></i>
|
|
|
<span>商品上线</span>
|
|
|
</el-button>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
+
|
|
|
<el-row style="margin-top: 10px">
|
|
|
- <el-col :span="4" style="width: 225px">
|
|
|
- <search-brand
|
|
|
- :value="brandid"
|
|
|
- :disabled="false"
|
|
|
- :size="'mini'"
|
|
|
- :isDetail="true"
|
|
|
- :names="parmValue.supplierName"
|
|
|
- :placeholder="'商品品牌'"
|
|
|
- @searchChange="brandidsearchChange"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :span="4" style="width: 145px; padding: 0 0 0 10px">
|
|
|
+ <!-- <el-col :span="4" style="width: 225px">
|
|
|
<el-select
|
|
|
v-model="parmValue.is_stock"
|
|
|
size="mini"
|
|
@@ -177,8 +216,25 @@
|
|
|
:label="opt.label"
|
|
|
/>
|
|
|
</el-select>
|
|
|
+ </el-col>-->
|
|
|
+ <el-col :span="4" style="margin-right:10px">
|
|
|
+ <el-select
|
|
|
+ v-model="parmValue.is_combind"
|
|
|
+ placeholder="是否组合商品"
|
|
|
+ style="width:100%"
|
|
|
+ size="mini"
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option label="是组合商品" value="1" />
|
|
|
+ <el-option label="不是组合商品" value="0" />
|
|
|
+ </el-select>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="width: 420px; padding: 0 0 0 10px">
|
|
|
+
|
|
|
+ <el-col :span="4" style="width: 360px">
|
|
|
<el-input
|
|
|
:size="searchSize"
|
|
|
v-model="sinput"
|
|
@@ -189,7 +245,8 @@
|
|
|
searchList();
|
|
|
"
|
|
|
placeholder="关键字"
|
|
|
- ><el-select
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
v-model="select"
|
|
|
slot="prepend"
|
|
|
style="width: 135px"
|
|
@@ -205,12 +262,18 @@
|
|
|
<!-- <el-option label="业务企业编号" value="3" /> -->
|
|
|
<!-- <el-option label="供应商编号" value="4" /> -->
|
|
|
<!-- <el-option label="创建人部门" value="5" /> -->
|
|
|
- </el-select></el-input
|
|
|
- >
|
|
|
+ </el-select>
|
|
|
+ </el-input>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </div></template
|
|
|
- >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #spuCode="{ scope }">
|
|
|
+ <div style="display:flex;align-items:center">
|
|
|
+ <p>{{scope.row.spuCode}}</p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
|
|
|
<template #good_thumb_img="{ scope }">
|
|
|
<div
|
|
@@ -222,7 +285,7 @@
|
|
|
<img
|
|
|
:src="scope.row.good_thumb_img"
|
|
|
style="display: inline-block; width: 100%; height: 100%"
|
|
|
- alt=""
|
|
|
+ alt
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -237,6 +300,29 @@
|
|
|
"
|
|
|
></el-tag>
|
|
|
</template>
|
|
|
+ <template #has_account="{ scope }">
|
|
|
+ <el-tag
|
|
|
+ :size="tablebtnSize"
|
|
|
+ :type="
|
|
|
+ (
|
|
|
+ has_account_list.find((item) => item.code == scope.row.has_account + '') ||
|
|
|
+ {}
|
|
|
+ ).type || '--'
|
|
|
+ "
|
|
|
+ v-text="
|
|
|
+ (
|
|
|
+ has_account_list.find((item) => item.code == scope.row.has_account + '') ||
|
|
|
+ {}
|
|
|
+ ).name || '--'
|
|
|
+ "
|
|
|
+ ></el-tag>
|
|
|
+ </template>
|
|
|
+ <template #is_combind="{ scope }">
|
|
|
+ <el-tag
|
|
|
+ size="mini"
|
|
|
+ :type="scope.row.is_combind === '1' ? '' : 'warning'"
|
|
|
+ >{{scope.row.is_combind === '1' ? '是组合商品' : '不是组合商品'}}</el-tag>
|
|
|
+ </template>
|
|
|
<template #isonline="{ scope }">
|
|
|
<el-tag
|
|
|
:size="tablebtnSize"
|
|
@@ -269,23 +355,25 @@
|
|
|
@click="getRouter('supplierGoodsCostDetail', scope.row.spuCode)"
|
|
|
></i>
|
|
|
</el-tooltip>
|
|
|
- <!-- <el-tooltip
|
|
|
- v-if="powers.some((i) => i == '079') && scope.row.status !== '8'"
|
|
|
+ <el-tooltip
|
|
|
+ v-if="
|
|
|
+ powers.some((i) => i == '079') && scope.row.status !== '8' && !isSupertube
|
|
|
+ "
|
|
|
effect="dark"
|
|
|
content="下线商品"
|
|
|
placement="top"
|
|
|
>
|
|
|
- <i
|
|
|
- class="el-icon-download tb-icon"
|
|
|
- @click="showDonlineDlg(scope.row.spuCode)"
|
|
|
- ></i>
|
|
|
- </el-tooltip> -->
|
|
|
- <!-- (scope.row.is_stock + '' === '0') -->
|
|
|
+ <i class="el-icon-download tb-icon" @click="showDonlineDlg(scope.row.spuCode)"></i>
|
|
|
+ </el-tooltip>
|
|
|
+
|
|
|
+ <!-- scope.row.has_account + '' == '0' && -->
|
|
|
<el-tooltip
|
|
|
v-if="
|
|
|
- (ppowers.some((i) => i == '7') && scope.row.status + '' === '7') ||
|
|
|
- (ppowers.some((i) => i == '6') && scope.row.status + '' === '6') ||
|
|
|
- (ppowers.some((i) => i == '8') && scope.row.status + '' === '8')
|
|
|
+ (((ppowers.some((i) => i == '7') && scope.row.status + '' === '7') ||
|
|
|
+ (ppowers.some((i) => i == '6') && scope.row.status + '' === '6') ||
|
|
|
+ (ppowers.some((i) => i == '8') && scope.row.status + '' === '8')) &&
|
|
|
+ (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')) &&
|
|
|
+ !isSupertube && String(scope.row.has_account) === '0'
|
|
|
"
|
|
|
effect="dark"
|
|
|
content="修改"
|
|
@@ -303,8 +391,10 @@
|
|
|
</el-tooltip>
|
|
|
<el-tooltip
|
|
|
v-if="
|
|
|
- ppowers.some((i) => i == '4') &&
|
|
|
- (scope.row.status + '' === '4' || scope.row.status + '' === '1')
|
|
|
+ (ppowers.some((i) => i == '4') &&
|
|
|
+ (scope.row.status + '' === '4' || scope.row.status + '' === '1') &&
|
|
|
+ (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')) &&
|
|
|
+ !isSupertube && String(scope.row.has_account) === '0'
|
|
|
"
|
|
|
effect="dark"
|
|
|
content="修改基础信息"
|
|
@@ -315,10 +405,13 @@
|
|
|
@click="wantto(scope.row.is_online, scope.row.spuCode, scope.row.status, '2')"
|
|
|
></i>
|
|
|
</el-tooltip>
|
|
|
+ <!-- scope.row.has_account + '' == '0' && -->
|
|
|
<el-tooltip
|
|
|
v-if="
|
|
|
- ppowers.some((i) => i == '5') &&
|
|
|
- (scope.row.status + '' === '5' || scope.row.status + '' === '1')
|
|
|
+ (ppowers.some((i) => i == '5') &&
|
|
|
+ (scope.row.status + '' === '5' || scope.row.status + '' === '1') &&
|
|
|
+ (scope.row.is_stock + '' === '0' || scope.row.is_stock + '' === '1')) &&
|
|
|
+ !isSupertube && String(scope.row.has_account) === '0'
|
|
|
"
|
|
|
effect="dark"
|
|
|
content="修改成本信息"
|
|
@@ -333,26 +426,24 @@
|
|
|
v-if="
|
|
|
powers.some((i) => i == '010') &&
|
|
|
!(scope.row.status + '' === '7' || scope.row.status + '' === '8') &&
|
|
|
+ !isSupertube &&
|
|
|
String(scope.row.createrid) !== '0'
|
|
|
"
|
|
|
effect="dark"
|
|
|
content="复制商品"
|
|
|
placement="top"
|
|
|
>
|
|
|
- <i
|
|
|
- class="el-icon-document-copy tb-icon"
|
|
|
- @click="good_copy(scope.row.spuCode)"
|
|
|
- ></i>
|
|
|
+ <i class="el-icon-document-copy tb-icon" @click="good_copy(scope.row.spuCode)"></i>
|
|
|
</el-tooltip>
|
|
|
|
|
|
- <!-- <el-tooltip
|
|
|
- v-if="powers.some((i) => i == '006')"
|
|
|
+ <el-tooltip
|
|
|
+ v-if="powers.some((i) => i == '006') && !isSupertube"
|
|
|
effect="dark"
|
|
|
content="删除"
|
|
|
placement="top"
|
|
|
>
|
|
|
<i class="el-icon-delete tb-icon" @click="deleteItem(scope.row.spuCode)"></i>
|
|
|
- </el-tooltip> -->
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
</ex-table>
|
|
|
<no-auth v-else></no-auth>
|
|
@@ -404,36 +495,39 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import asyncRequest from "@/apis/service/goodStore/goodsCost";
|
|
|
+import { listCol, options1, options4 } from "./columns";
|
|
|
+import { has_account_list, isStockOptions } from "@/assets/js/statusList";
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
-import { mapGetters } from "vuex";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-import { listCol, options1, options4 } from "./columns";
|
|
|
-import { isStockOptions } from "@/assets/js/statusList";
|
|
|
-import addEdit from "./components/addEdit";
|
|
|
import companyHelper from "@/mixins/companyHelper";
|
|
|
+import addEdit from "./components/addEdit";
|
|
|
+
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
name: "goodsCost",
|
|
|
mixins: [mixinPage, resToken, companyHelper],
|
|
|
components: {
|
|
|
- addEdit,
|
|
|
+ addEdit
|
|
|
},
|
|
|
computed: {
|
|
|
//组件SIZE设置
|
|
|
- ...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
+ ...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
|
|
|
powers() {
|
|
|
const tran =
|
|
|
- this.$store.getters.btnList.find((i) => i.menu_route == "supplierGoodsCost") ||
|
|
|
- {};
|
|
|
+ this.$store.getters.btnList.find(
|
|
|
+ i => i.menu_route == "supplierGoodsCost"
|
|
|
+ ) || {};
|
|
|
const { action } = tran ?? {};
|
|
|
return action ?? [];
|
|
|
},
|
|
|
ppowers() {
|
|
|
const tran =
|
|
|
- this.$store.getters.roleProcess.find((i) => i.process_type === "SPCB") || {};
|
|
|
+ this.$store.getters.roleProcess.find(i => i.process_type === "SPCB") ||
|
|
|
+ {};
|
|
|
const { action } = tran ?? {};
|
|
|
console.log(action);
|
|
|
- return action ?? [];
|
|
|
- },
|
|
|
+ return action || [];
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
var validate = (rule, value, callback) => {
|
|
@@ -444,68 +538,73 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
- isStockOptions,
|
|
|
dialogFormVisible: false,
|
|
|
+ has_account_list,
|
|
|
donline_formStOps: [],
|
|
|
+ isStockOptions,
|
|
|
donline_form: {
|
|
|
offline_reason: "",
|
|
|
offline_remark: "",
|
|
|
- spuCode: "",
|
|
|
+ spuCode: ""
|
|
|
},
|
|
|
donline_rules: {
|
|
|
- offline_reason: [{ validator: validate, required: true, trigger: "blur" }],
|
|
|
- offline_remark: [{ validator: validate, required: true, trigger: "blur" }],
|
|
|
+ offline_reason: [
|
|
|
+ { validator: validate, required: true, trigger: "blur" }
|
|
|
+ ],
|
|
|
+ offline_remark: [
|
|
|
+ { validator: validate, required: true, trigger: "blur" }
|
|
|
+ ]
|
|
|
},
|
|
|
statusList: [
|
|
|
{
|
|
|
code: "0",
|
|
|
name: "新建待审核",
|
|
|
- type: "",
|
|
|
+ type: ""
|
|
|
},
|
|
|
{
|
|
|
code: "1",
|
|
|
name: "审核通过",
|
|
|
- type: "success",
|
|
|
+ type: "success"
|
|
|
},
|
|
|
{
|
|
|
code: "2",
|
|
|
name: "基础修改待审核",
|
|
|
- type: "",
|
|
|
+ type: ""
|
|
|
},
|
|
|
{
|
|
|
code: "3",
|
|
|
name: "成本修改待审核",
|
|
|
- type: "",
|
|
|
+ type: ""
|
|
|
},
|
|
|
{
|
|
|
code: "4",
|
|
|
name: "基础修改驳回",
|
|
|
- type: "danger",
|
|
|
+ type: "danger"
|
|
|
},
|
|
|
{
|
|
|
code: "5",
|
|
|
name: "成本修改驳回",
|
|
|
- type: "danger",
|
|
|
+ type: "danger"
|
|
|
},
|
|
|
{
|
|
|
code: "6",
|
|
|
name: "新建审核驳回",
|
|
|
- type: "danger",
|
|
|
+ type: "danger"
|
|
|
},
|
|
|
{
|
|
|
code: "7",
|
|
|
name: "复制商品待编辑",
|
|
|
- type: "info",
|
|
|
+ type: "info"
|
|
|
},
|
|
|
{
|
|
|
code: "8",
|
|
|
name: "竞价商品待编辑",
|
|
|
- type: "info",
|
|
|
- },
|
|
|
+ type: "info"
|
|
|
+ }
|
|
|
],
|
|
|
isonlineoptions: [
|
|
|
{ id: "0", name: "未上线" },
|
|
|
- { id: "1", name: "已上线" },
|
|
|
+ { id: "1", name: "已上线" }
|
|
|
],
|
|
|
showModel: false,
|
|
|
options1,
|
|
@@ -515,6 +614,8 @@ export default {
|
|
|
parmValue: {
|
|
|
page: 1, // 页码
|
|
|
size: 15, // 每页显示条数
|
|
|
+ is_combind: "",
|
|
|
+ is_stock: "",
|
|
|
start: "",
|
|
|
end: "",
|
|
|
status: "",
|
|
@@ -526,8 +627,7 @@ export default {
|
|
|
companyNo: "",
|
|
|
supplierNo: "",
|
|
|
isonline: "",
|
|
|
- company_name: "", //创建人部门
|
|
|
- is_stock: "",
|
|
|
+ company_name: "" //创建人部门
|
|
|
// creater: "",
|
|
|
},
|
|
|
sinput: "",
|
|
@@ -538,18 +638,18 @@ export default {
|
|
|
table: {
|
|
|
stripe: true,
|
|
|
border: true,
|
|
|
- _defaultHeader_: ["setcol"],
|
|
|
+ _defaultHeader_: ["setcol"]
|
|
|
},
|
|
|
// 表格 - 分页
|
|
|
pageInfo: {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
},
|
|
|
// 表格 - 列参数
|
|
|
columns: listCol,
|
|
|
supplierNo: [],
|
|
|
- brandid: [],
|
|
|
+ brandid: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -566,7 +666,7 @@ export default {
|
|
|
this.pageInfo = {
|
|
|
size: size,
|
|
|
curr: page,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
};
|
|
|
//多选条件
|
|
|
this.select = this.parmValue.select;
|
|
@@ -582,21 +682,22 @@ export default {
|
|
|
this.searchList();
|
|
|
},
|
|
|
methods: {
|
|
|
- companyNosearchChange({ code }) {
|
|
|
- this.parmValue.companyNo = code;
|
|
|
- this.searchList();
|
|
|
- },
|
|
|
handleCreate() {
|
|
|
- // if(!this.currentIsBusinessCompany()) return
|
|
|
+ // if (!this.currentIsBusinessCompany()) return;
|
|
|
this.routeGoto("supplierGoodsCostDetail", { id: "add", type: "add" });
|
|
|
},
|
|
|
+ async supplierChange(e) {
|
|
|
+ const { code, label } = e;
|
|
|
+ this.supplierNo = code ? [code] : [];
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
// 获取异常原因下拉列表
|
|
|
async getresultlist() {
|
|
|
const res = await asyncRequest.resultlist({
|
|
|
page: 1,
|
|
|
size: 100,
|
|
|
type: "8",
|
|
|
- status: "3",
|
|
|
+ status: "3"
|
|
|
});
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
const { list } = res.data;
|
|
@@ -611,18 +712,16 @@ export default {
|
|
|
if (toRouter && queryId) {
|
|
|
let model = {
|
|
|
id: queryId,
|
|
|
- type: "view",
|
|
|
+ type: "view"
|
|
|
};
|
|
|
|
|
|
//有多选框的条件
|
|
|
this.parmValue.select = this.select;
|
|
|
- // this.parmValue.sselect = this.sselect ;
|
|
|
this.parmValue.sinput = this.sinput;
|
|
|
//
|
|
|
- console.log(this.parmValue);
|
|
|
let routerModel = {
|
|
|
options: JSON.parse(JSON.stringify(this.parmValue)),
|
|
|
- router: this.$route.path,
|
|
|
+ router: this.$route.path
|
|
|
};
|
|
|
model.preModel = JSON.stringify(routerModel);
|
|
|
|
|
@@ -640,7 +739,7 @@ export default {
|
|
|
this.pageInfo = {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
};
|
|
|
this.parmValue = {
|
|
|
page: 1, // 页码
|
|
@@ -657,18 +756,20 @@ export default {
|
|
|
isonline: "",
|
|
|
companyNo: "",
|
|
|
supplierNo: "",
|
|
|
- is_stock: "",
|
|
|
+ is_combind: ""
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
|
async wantto(isonline, spuCode, ntype, wtype) {
|
|
|
- const { code, data, message } = await asyncRequest.checkIsUpdate({ spuCode });
|
|
|
+ const { code, data, message } = await asyncRequest.checkIsUpdate({
|
|
|
+ spuCode
|
|
|
+ });
|
|
|
if (code === 0) {
|
|
|
const { is_allow_update } = data;
|
|
|
if (is_allow_update + "" === "1") {
|
|
|
this.routeGoto("supplierGoodsCostDetail", {
|
|
|
id: spuCode,
|
|
|
- type: wtype === "2" ? "editBase" : wtype === "3" ? "editCoin" : "",
|
|
|
+ type: wtype === "2" ? "editBase" : wtype === "3" ? "editCoin" : ""
|
|
|
});
|
|
|
} else {
|
|
|
if (isonline + "" === "1") {
|
|
@@ -721,19 +822,19 @@ export default {
|
|
|
await this.$confirm(`确定要复制该商品?`, {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(async () => {
|
|
|
this.loading = true;
|
|
|
const model = {
|
|
|
- spuCode: spuCode,
|
|
|
+ spuCode: spuCode
|
|
|
};
|
|
|
const res = await asyncRequest.copy(model);
|
|
|
if (res && res.code === 0) {
|
|
|
this.loading = false;
|
|
|
this.$notify.success({
|
|
|
title: "复制商品成功!",
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
await this.searchList();
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
@@ -753,23 +854,26 @@ export default {
|
|
|
* @param {String} status 0-禁用 1-启用
|
|
|
*/
|
|
|
async changeStatus(id, status) {
|
|
|
- await this.$confirm(`确定要改为${status + "" === "1" ? "禁用" : "启用"}?`, {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
+ await this.$confirm(
|
|
|
+ `确定要改为${status + "" === "1" ? "禁用" : "启用"}?`,
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }
|
|
|
+ )
|
|
|
.then(async () => {
|
|
|
this.loading = true;
|
|
|
const model = {
|
|
|
id: id,
|
|
|
- status: status + "" === "1" ? "0" : "1",
|
|
|
+ status: status + "" === "1" ? "0" : "1"
|
|
|
};
|
|
|
const res = await asyncRequest.status(model);
|
|
|
if (res && res.code === 0) {
|
|
|
this.loading = false;
|
|
|
this.$notify.success({
|
|
|
title: "状态修改成功!",
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
await this.searchList();
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
@@ -787,17 +891,17 @@ export default {
|
|
|
await this.$confirm("确定要删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(async () => {
|
|
|
const model = {
|
|
|
- codes: [code],
|
|
|
+ codes: [code]
|
|
|
};
|
|
|
const res = await asyncRequest.delete(model);
|
|
|
if (res && res.code === 0) {
|
|
|
this.$notify.success({
|
|
|
title: "删除成功",
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
this.searchList();
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
@@ -823,21 +927,20 @@ export default {
|
|
|
let item = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
item.spucode = this.select === "1" ? this.sinput : "";
|
|
|
item.good_name = this.select === "2" ? this.sinput : "";
|
|
|
- // item.companyNo = this.select === "3" ? this.sinput : "";
|
|
|
+ item.companyNo = this.select === "3" ? this.sinput : "";
|
|
|
+ item.supplierNo = this.select === "4" ? this.sinput : "";
|
|
|
item.company_name = this.select === "5" ? this.sinput : ""; // 部门
|
|
|
- item.cat_id = item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : "";
|
|
|
- // item.companyNo = this.currentCompany
|
|
|
- item.noRelation = true;
|
|
|
-
|
|
|
- const res = await asyncRequest.copy_list({
|
|
|
+ item.cat_id =
|
|
|
+ item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : "";
|
|
|
+ const res = await asyncRequest.list({
|
|
|
...item,
|
|
|
- noRelation: true,
|
|
|
supplierNo: this.currentCompany,
|
|
|
+ noRelation: true
|
|
|
});
|
|
|
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
this.tableData = res.data.list;
|
|
|
- this.tableData.forEach((a) => {
|
|
|
+ this.tableData.forEach(a => {
|
|
|
a.cat_name = "";
|
|
|
let list = a.cat_info || [];
|
|
|
list.forEach((b, i) => {
|
|
@@ -871,7 +974,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let isok = true;
|
|
|
- this.changeList.forEach((e) => {
|
|
|
+ this.changeList.forEach(e => {
|
|
|
if (String(e.status) !== "1") {
|
|
|
isok = false;
|
|
|
}
|
|
@@ -888,14 +991,14 @@ export default {
|
|
|
this.donline_form = {
|
|
|
offline_reason: "",
|
|
|
offline_remark: "",
|
|
|
- skuCode: "",
|
|
|
+ skuCode: ""
|
|
|
};
|
|
|
this.donline_form.spuCode = spuCode;
|
|
|
// this.donlineDlg(spuCode)
|
|
|
},
|
|
|
//商品下线原因 确定
|
|
|
async donlineDlg() {
|
|
|
- await this.$refs.donline_Form.validate(async (valid) => {
|
|
|
+ await this.$refs.donline_Form.validate(async valid => {
|
|
|
if (valid) {
|
|
|
this.dialogFormVisible = false;
|
|
|
this.get_donline(this.donline_form.spuCode);
|
|
@@ -912,7 +1015,7 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true,
|
|
|
+ center: true
|
|
|
})
|
|
|
.then(async () => {
|
|
|
this.loading = true;
|
|
@@ -922,7 +1025,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
this.$notify.success({
|
|
|
title: res.message,
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
await this.searchList();
|
|
|
} else if (res && res.code >= 100 && res.code <= 104) {
|
|
@@ -935,8 +1038,8 @@ export default {
|
|
|
.catch(async () => {
|
|
|
console.log("取消");
|
|
|
});
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|