|
@@ -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: 303px">
|
|
|
+ <el-col :span="6" style="width: 301px">
|
|
|
<period-date-picker
|
|
|
:type="1"
|
|
|
:width="'135px'"
|
|
@@ -35,18 +35,8 @@
|
|
|
@timeReturned="handleTime"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- <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">
|
|
|
+
|
|
|
+ <el-col :span="6" style="width: 310px">
|
|
|
<good-class
|
|
|
:value="parmValue.cat_id"
|
|
|
@handleChange="goods_class_change"
|
|
@@ -113,45 +103,14 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="4" style="margin-left:10px">
|
|
|
+
|
|
|
+ <el-col :span="4" style="width: 320px; padding: 0 0 0 10px">
|
|
|
<search-work-company
|
|
|
- :value="parmValue.companyNo"
|
|
|
- :placeholder="'业务公司'"
|
|
|
- :size="searchSize"
|
|
|
- @searchChange="companyNosearchChange"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="4" style="width: 420px; padding: 0 0 0 10px">
|
|
|
- <el-input
|
|
|
+ :value="parmValue.companyNo"
|
|
|
+ :placeholder="'业务公司'"
|
|
|
:size="searchSize"
|
|
|
- v-model="sinput"
|
|
|
- :maxlength="40"
|
|
|
- @blur="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- placeholder="关键字"
|
|
|
- ><el-select
|
|
|
- v-model="select"
|
|
|
- slot="prepend"
|
|
|
- style="width: 135px"
|
|
|
- @change="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- placeholder="关键字类型"
|
|
|
- >
|
|
|
- <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-input
|
|
|
- >
|
|
|
+ @searchChange="companyNosearchChange"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
|
|
|
<el-col
|
|
@@ -186,6 +145,70 @@
|
|
|
</el-button>
|
|
|
</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-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: 420px; padding: 0 0 0 10px">
|
|
|
+ <el-input
|
|
|
+ :size="searchSize"
|
|
|
+ v-model="sinput"
|
|
|
+ :maxlength="40"
|
|
|
+ @blur="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ placeholder="关键字"
|
|
|
+ ><el-select
|
|
|
+ v-model="select"
|
|
|
+ slot="prepend"
|
|
|
+ style="width: 135px"
|
|
|
+ @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ placeholder="关键字类型"
|
|
|
+ >
|
|
|
+ <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-input
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div></template
|
|
|
>
|
|
|
|
|
@@ -260,9 +283,9 @@
|
|
|
<!-- (scope.row.is_stock + '' === '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')
|
|
|
"
|
|
|
effect="dark"
|
|
|
content="修改"
|
|
@@ -292,9 +315,6 @@
|
|
|
@click="wantto(scope.row.is_online, scope.row.spuCode, scope.row.status, '2')"
|
|
|
></i>
|
|
|
</el-tooltip>
|
|
|
- <!-- &&
|
|
|
- ((scope.row.has_account + '' == '0' && scope.row.is_stock + '' === '0') ||
|
|
|
- scope.row.is_stock + '' === '1') -->
|
|
|
<el-tooltip
|
|
|
v-if="
|
|
|
ppowers.some((i) => i == '5') &&
|
|
@@ -312,7 +332,8 @@
|
|
|
<el-tooltip
|
|
|
v-if="
|
|
|
powers.some((i) => i == '010') &&
|
|
|
- !(scope.row.status + '' === '7' || scope.row.status + '' === '8')
|
|
|
+ !(scope.row.status + '' === '7' || scope.row.status + '' === '8') &&
|
|
|
+ String(scope.row.createrid) !== '0'
|
|
|
"
|
|
|
effect="dark"
|
|
|
content="复制商品"
|
|
@@ -387,8 +408,9 @@ 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 companyHelper from "@/mixins/companyHelper";
|
|
|
export default {
|
|
|
name: "goodsCost",
|
|
|
mixins: [mixinPage, resToken, companyHelper],
|
|
@@ -400,7 +422,8 @@ export default {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
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 ?? [];
|
|
|
},
|
|
@@ -408,7 +431,7 @@ export default {
|
|
|
const tran =
|
|
|
this.$store.getters.roleProcess.find((i) => i.process_type === "SPCB") || {};
|
|
|
const { action } = tran ?? {};
|
|
|
- console.log(action)
|
|
|
+ console.log(action);
|
|
|
return action ?? [];
|
|
|
},
|
|
|
},
|
|
@@ -421,6 +444,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ isStockOptions,
|
|
|
dialogFormVisible: false,
|
|
|
donline_formStOps: [],
|
|
|
donline_form: {
|
|
@@ -503,6 +527,7 @@ export default {
|
|
|
supplierNo: "",
|
|
|
isonline: "",
|
|
|
company_name: "", //创建人部门
|
|
|
+ is_stock: "",
|
|
|
// creater: "",
|
|
|
},
|
|
|
sinput: "",
|
|
@@ -557,13 +582,13 @@ export default {
|
|
|
this.searchList();
|
|
|
},
|
|
|
methods: {
|
|
|
- companyNosearchChange({code}){
|
|
|
- this.parmValue.companyNo = code
|
|
|
+ companyNosearchChange({ code }) {
|
|
|
+ this.parmValue.companyNo = code;
|
|
|
this.searchList();
|
|
|
},
|
|
|
- handleCreate(){
|
|
|
+ handleCreate() {
|
|
|
// if(!this.currentIsBusinessCompany()) return
|
|
|
- this.routeGoto('supplierGoodsCostDetail', { id: 'add', type: 'add' })
|
|
|
+ this.routeGoto("supplierGoodsCostDetail", { id: "add", type: "add" });
|
|
|
},
|
|
|
// 获取异常原因下拉列表
|
|
|
async getresultlist() {
|
|
@@ -632,6 +657,7 @@ export default {
|
|
|
isonline: "",
|
|
|
companyNo: "",
|
|
|
supplierNo: "",
|
|
|
+ is_stock: "",
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
@@ -727,7 +753,7 @@ export default {
|
|
|
* @param {String} status 0-禁用 1-启用
|
|
|
*/
|
|
|
async changeStatus(id, status) {
|
|
|
- await this.$confirm(`确定要改为${status + '' === "1" ? "禁用" : "启用"}?`, {
|
|
|
+ await this.$confirm(`确定要改为${status + "" === "1" ? "禁用" : "启用"}?`, {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
@@ -736,7 +762,7 @@ export default {
|
|
|
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) {
|
|
@@ -801,14 +827,14 @@ export default {
|
|
|
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
|
|
|
+ item.noRelation = true;
|
|
|
|
|
|
const res = await asyncRequest.copy_list({
|
|
|
...item,
|
|
|
noRelation: true,
|
|
|
- supplierNo: this.currentCompany
|
|
|
+ supplierNo: this.currentCompany,
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
if (res && res.code === 0 && res.data) {
|
|
|
this.tableData = res.data.list;
|
|
|
this.tableData.forEach((a) => {
|