|
@@ -21,15 +21,13 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="总数量" prop="num">
|
|
|
- <el-input
|
|
|
- placeholder="总数量"
|
|
|
- :disabled="type === 'view'"
|
|
|
- v-model="ruleForm.num"
|
|
|
- />
|
|
|
+ <el-input placeholder="总数量" :disabled="type === 'view'" v-model="ruleForm.num" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="总价" class="clear">
|
|
|
<el-input disabled :value="Number(total).toFixed(2)" />
|
|
@@ -43,26 +41,56 @@
|
|
|
<search-work-company
|
|
|
:disabled="true"
|
|
|
:value="ruleForm.customerCode"
|
|
|
+ :names="ruleForm.customerName"
|
|
|
:placeholder="'业务公司'"
|
|
|
+ :isDetail="true"
|
|
|
:size="'mini'"
|
|
|
@searchChange="company_idsearchChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="供应商" prop="supplierNo">
|
|
|
- <!-- :names="supplierName"
|
|
|
- :isDetail="type !== 'add'"
|
|
|
- :isp="this.type !== 'view'" -->
|
|
|
<search-supplier
|
|
|
- :is-detail="true"
|
|
|
+ :isDetail="true"
|
|
|
:value="ruleForm.supplierNo"
|
|
|
- :names="supplierName"
|
|
|
+ :names="ruleForm.supplierName"
|
|
|
:placeholder="'供应商'"
|
|
|
:disabled="type === 'view'"
|
|
|
:size="'mini'"
|
|
|
@searchChange="supplierNosearchChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="附件" prop="fill_url">
|
|
|
+ <div v-if="ruleForm.fill_url" class="clearfix">
|
|
|
+ <a :href="ruleForm.fill_url" download="凭证文件">点击下载</a>
|
|
|
+
|
|
|
+ <el-link
|
|
|
+ :underline="false"
|
|
|
+ @click="ruleForm.fill_url = ''"
|
|
|
+ type="warning"
|
|
|
+ style="margin: 0 0 0 16px"
|
|
|
+ >删除</el-link>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="activity-upload" v-else>
|
|
|
+ <div class="btnupload" style="position: relative">
|
|
|
+ <i class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
+ <file-upload-pdf
|
|
|
+ class="Upload"
|
|
|
+ :accept="'.xlsx,.xls,.pdf,.zip,.rar,.7z'"
|
|
|
+ :multiple="false"
|
|
|
+ :uploadcondition="beforeOtherUpload"
|
|
|
+ @UploadErrorEvent="UploadErrorOtherproof_url"
|
|
|
+ @UploadSuccessEvent="UploadSuccessOtherproof_url"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="txt-tips fl">
|
|
|
+ <p>建议大小:小于5MB</p>
|
|
|
+ <p>文件格式:.xlsx,.xls,.pdf,.zip,.rar,.7z</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
<el-row>
|
|
|
<el-col :span="7">
|
|
@@ -126,34 +154,26 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="7">
|
|
|
- <el-form-item
|
|
|
- :label="ruleForm.is_determine_price === '1' ? '采购裸价' : '销售单价'"
|
|
|
- >
|
|
|
+ <el-form-item :label="ruleForm.is_determine_price === '1' ? '采购裸价' : '销售单价'">
|
|
|
<el-input
|
|
|
v-if="ruleForm.is_determine_price === '1'"
|
|
|
:disabled="true"
|
|
|
v-model="ruleForm.cgd_charge"
|
|
|
- :placeholder="'采购裸价'" />
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- :disabled="true"
|
|
|
- v-model="ruleForm.price"
|
|
|
- :placeholder="'销售单价'"
|
|
|
- /></el-form-item>
|
|
|
+ :placeholder="'采购裸价'"
|
|
|
+ />
|
|
|
+ <el-input v-else :disabled="true" v-model="ruleForm.price" :placeholder="'销售单价'" />
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="7">
|
|
|
<el-form-item prop="type" label="确定" label-width="60px">
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.type"
|
|
|
- style="width: 100%"
|
|
|
- :disabled="type === 'view'"
|
|
|
- >
|
|
|
+ <el-select v-model="ruleForm.type" style="width: 100%" :disabled="type === 'view'">
|
|
|
<el-option value="1" label="服务费金额" />
|
|
|
<el-option value="0" label="服务费比例" />
|
|
|
- </el-select> </el-form-item
|
|
|
- ></el-col>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="10">
|
|
|
<el-form-item
|
|
|
label="服务费比例"
|
|
@@ -234,11 +254,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="17">
|
|
|
<el-form-item label="订单总金额" label-width="100px">
|
|
|
- <el-input
|
|
|
- :disabled="true"
|
|
|
- v-model="ruleForm.total"
|
|
|
- :placeholder="'订单总金额'"
|
|
|
- /></el-form-item>
|
|
|
+ <el-input :disabled="true" v-model="ruleForm.total" :placeholder="'订单总金额'" />
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
@@ -252,8 +269,9 @@
|
|
|
:disabled="type === 'view'"
|
|
|
v-model="ruleForm.good_name"
|
|
|
placeholder="商品名称"
|
|
|
- /> </el-form-item
|
|
|
- ></el-col>
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="16">
|
|
|
<el-row>
|
|
|
<el-col :span="14">
|
|
@@ -262,7 +280,7 @@
|
|
|
:value="ruleForm.cat_id"
|
|
|
:placeholder="'分类'"
|
|
|
:size="'mini'"
|
|
|
- :names="cat_id_name"
|
|
|
+ :names="ruleForm.cat_id_name"
|
|
|
:disabled="type === 'view' || ruleForm.customerCode.length === 0"
|
|
|
:company-no="ruleForm.customerCode"
|
|
|
:isDetail="true"
|
|
@@ -277,7 +295,7 @@
|
|
|
:size="'mini'"
|
|
|
:disabled="type === 'view'"
|
|
|
:isDetail="true"
|
|
|
- :names="brand_name"
|
|
|
+ :names="ruleForm.brand_name"
|
|
|
:placeholder="'品牌'"
|
|
|
@searchChange="brand_idsearchChange"
|
|
|
/>
|
|
@@ -291,7 +309,7 @@
|
|
|
:value="ruleForm.unit_id"
|
|
|
:size="'mini'"
|
|
|
:isDetail="true"
|
|
|
- :names="unit_name"
|
|
|
+ :names="ruleForm.unit_name"
|
|
|
:disabled="type === 'view'"
|
|
|
:placeholder="'单位'"
|
|
|
@searchChange="unitsearchChange"
|
|
@@ -390,6 +408,8 @@
|
|
|
size="mini"
|
|
|
:placeholder="'产地'"
|
|
|
:level="3"
|
|
|
+ :searchCode="true"
|
|
|
+ :names="ruleForm.origin_place_codes"
|
|
|
@searchChange="selectAreaoriginChange($event)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -461,12 +481,7 @@
|
|
|
<el-table-column fixed="right" width="88px" v-if="type !== 'view'">
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
<span>操作</span>
|
|
|
- <el-tooltip
|
|
|
- class="item"
|
|
|
- effect="dark"
|
|
|
- content="添加规格类型"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
+ <el-tooltip class="item" effect="dark" content="添加规格类型" placement="top">
|
|
|
<i
|
|
|
class="el-icon-circle-plus-outline fr"
|
|
|
style="font-size: 18px; margin-top: 2px"
|
|
@@ -476,16 +491,10 @@
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
|
<el-tooltip effect="dark" content="修改" placement="top">
|
|
|
- <i
|
|
|
- class="el-icon-edit tb-icon"
|
|
|
- @click="openEdit(scope.$index, scope.row)"
|
|
|
- ></i>
|
|
|
+ <i class="el-icon-edit tb-icon" @click="openEdit(scope.$index, scope.row)"></i>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip effect="dark" v-if="!scope.row.isMust" placement="top">
|
|
|
- <i
|
|
|
- class="el-icon-delete tb-icon"
|
|
|
- @click="openDelete(scope.$index)"
|
|
|
- ></i>
|
|
|
+ <i class="el-icon-delete tb-icon" @click="openDelete(scope.$index)"></i>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -550,8 +559,7 @@
|
|
|
:key="item + index"
|
|
|
:label="item"
|
|
|
:value="item"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -562,8 +570,7 @@
|
|
|
maxlength="100"
|
|
|
:disabled="type === 'view'"
|
|
|
v-model="ruleForm.other_config"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -577,8 +584,7 @@
|
|
|
maxlength="500"
|
|
|
:disabled="type === 'view'"
|
|
|
v-model="ruleForm.remark"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工艺说明" prop="cost_desc">
|
|
|
<el-input
|
|
@@ -586,8 +592,7 @@
|
|
|
maxlength="500"
|
|
|
:disabled="type === 'view'"
|
|
|
v-model="ruleForm.cost_desc"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -660,7 +665,7 @@ import {
|
|
|
options11,
|
|
|
rules,
|
|
|
ruleForm1,
|
|
|
- other_ruleForm,
|
|
|
+ other_ruleForm
|
|
|
} from "../config/columns";
|
|
|
|
|
|
export default {
|
|
@@ -668,14 +673,15 @@ export default {
|
|
|
mixins: [resToken, companyHelper],
|
|
|
props: ["showModel", "id", "type", "sitem", "askItem", "newTime", "editId"],
|
|
|
components: {
|
|
|
- baseFormAddEdit,
|
|
|
+ baseFormAddEdit
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size", "business_companyNo"]),
|
|
|
powers() {
|
|
|
const tran =
|
|
|
- this.$store.getters.btnList.find((item) => item.menu_route == "goodsCostAdd") ||
|
|
|
- {};
|
|
|
+ this.$store.getters.btnList.find(
|
|
|
+ item => item.menu_route == "goodsCostAdd"
|
|
|
+ ) || {};
|
|
|
const { action } = tran ?? {};
|
|
|
return action ?? [];
|
|
|
},
|
|
@@ -683,14 +689,14 @@ export default {
|
|
|
const { is_determine_price, expect_service, num } = this.ruleForm;
|
|
|
const prop = is_determine_price === "1" ? "price" : "cgd_charge";
|
|
|
return accMul(add_sum(this.ruleForm[prop], expect_service), num);
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
- newTime: function (val) {
|
|
|
+ newTime: function(val) {
|
|
|
if (val) {
|
|
|
this.initForm();
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
data() {
|
|
@@ -728,11 +734,11 @@ export default {
|
|
|
options9: options9,
|
|
|
options10: options10,
|
|
|
options11: options11,
|
|
|
- ruleForm: ruleForm1,
|
|
|
+ ruleForm: { ...ruleForm1 },
|
|
|
rules,
|
|
|
|
|
|
//成本合算
|
|
|
- newPrice: 0,
|
|
|
+ newPrice: 0
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -740,6 +746,54 @@ export default {
|
|
|
this.initForm();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 其他文件上传成功
|
|
|
+ async UploadSuccessOtherproof_url(data) {
|
|
|
+ const { url } = data;
|
|
|
+ if (url === "noToken") {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.ruleForm.fill_url = url;
|
|
|
+
|
|
|
+ this.$message.success("文件成功!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ //其他文件上传失败
|
|
|
+ UploadErrorOtherproof_url(res) {
|
|
|
+ if (res !== "break") {
|
|
|
+ this.set_proof_url();
|
|
|
+ this.$message.error("文件上传失败!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ //判断其他文件规格
|
|
|
+ beforeOtherUpload(file) {
|
|
|
+ console.log(file);
|
|
|
+ let isJPG = false;
|
|
|
+ if (
|
|
|
+ file.type === "application/vnd.ms-excel" ||
|
|
|
+ file.type ===
|
|
|
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
|
|
|
+ file.type === "application/pdf" ||
|
|
|
+ file.type === "application/x-zip-compressed"
|
|
|
+ ) {
|
|
|
+ isJPG = true;
|
|
|
+ }
|
|
|
+ let name = file.name;
|
|
|
+ let list = name.split(".");
|
|
|
+ if (list[list.length - 1] === "rar" || list[list.length - 1] === "7z") {
|
|
|
+ isJPG = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ const isLt2M = file.size / 1024 / 1024 < 5;
|
|
|
+ if (!isJPG) {
|
|
|
+ this.$message.error("文件格式不正确!");
|
|
|
+ }
|
|
|
+ if (!isLt2M) {
|
|
|
+ this.$message.error("文件大小不能超过 5MB!");
|
|
|
+ }
|
|
|
+ return isJPG && isLt2M;
|
|
|
+ },
|
|
|
//图片悬浮删除
|
|
|
closeImg(index, key) {
|
|
|
this.ruleForm[key].splice(index, 1);
|
|
@@ -747,24 +801,10 @@ export default {
|
|
|
},
|
|
|
async initForm() {
|
|
|
this.loading = true;
|
|
|
- // this.resetFormData();
|
|
|
this.rulesThis = this.rules;
|
|
|
await this.resetForm();
|
|
|
-
|
|
|
- //贵金属校验
|
|
|
- // this.setrules();
|
|
|
-
|
|
|
this.loading = false;
|
|
|
- //调用成本合算计算函数
|
|
|
- // this.$refs.ruleForm.clearValidate([
|
|
|
- // "tax",
|
|
|
- // "cat_id",
|
|
|
- // "brand_id",
|
|
|
- // "supply_area",
|
|
|
- // "pay_way",
|
|
|
- // ]);
|
|
|
},
|
|
|
-
|
|
|
number_change(e, key) {
|
|
|
console.log("----" + e + "--" + key);
|
|
|
this.ruleForm[key] = e + "" || "0";
|
|
@@ -862,11 +902,13 @@ export default {
|
|
|
const { spec } = data;
|
|
|
if (spec && spec.length > 0) {
|
|
|
if (this.spec_tableData && this.spec_tableData.length > 0) {
|
|
|
- this.spec_tableData.forEach((c) => {
|
|
|
+ this.spec_tableData.forEach(c => {
|
|
|
c.isMust = false;
|
|
|
});
|
|
|
spec.forEach((a, ai) => {
|
|
|
- let findex = this.spec_tableData.findIndex((b) => b.specid === a.id);
|
|
|
+ let findex = this.spec_tableData.findIndex(
|
|
|
+ b => b.specid === a.id
|
|
|
+ );
|
|
|
if (findex !== -1) {
|
|
|
this.spec_tableData[findex].isMust = true;
|
|
|
} else {
|
|
@@ -877,7 +919,7 @@ export default {
|
|
|
spec_name: a.spec_name,
|
|
|
isMust: true,
|
|
|
spec_value_name: "",
|
|
|
- spec_value_id: "",
|
|
|
+ spec_value_id: ""
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -890,7 +932,7 @@ export default {
|
|
|
spec_name: a.spec_name,
|
|
|
isMust: true,
|
|
|
spec_value_name: "",
|
|
|
- spec_value_id: "",
|
|
|
+ spec_value_id: ""
|
|
|
};
|
|
|
this.spec_tableData.push(model);
|
|
|
});
|
|
@@ -918,7 +960,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
async submitForm() {
|
|
|
- await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
+ await this.$refs.ruleForm.validate(async valid => {
|
|
|
if (valid) {
|
|
|
if (!this.loading) {
|
|
|
this.loading = true;
|
|
@@ -939,7 +981,7 @@ export default {
|
|
|
const {
|
|
|
is_determine_price,
|
|
|
expect_service,
|
|
|
- expect_service_proportion,
|
|
|
+ expect_service_proportion
|
|
|
} = this.ruleForm;
|
|
|
const prop = is_determine_price === "1" ? "price" : "cgd_charge";
|
|
|
const label = is_determine_price === "1" ? "销售价" : "裸价";
|
|
@@ -983,10 +1025,10 @@ export default {
|
|
|
model.spec_list = [];
|
|
|
model.supplierNo = model.supplierNo.toString();
|
|
|
let list = JSON.parse(JSON.stringify(this.spec_tableData));
|
|
|
- list.forEach((a) => {
|
|
|
+ list.forEach(a => {
|
|
|
let am = {
|
|
|
spec_id: a.specid,
|
|
|
- spec_value_id: a.spec_value_id,
|
|
|
+ spec_value_id: a.spec_value_id
|
|
|
};
|
|
|
model.spec_list.push(am);
|
|
|
});
|
|
@@ -998,13 +1040,14 @@ export default {
|
|
|
res = await asyncRequest.good_update(model);
|
|
|
}
|
|
|
|
|
|
- const { code, data, message } = await this.useResHandle(res);
|
|
|
+ const { code } = await this.useResHandle(res);
|
|
|
+
|
|
|
this.loading = false;
|
|
|
if (code === 0) {
|
|
|
const title = this.type === "add" ? "新建成功!" : "修改成功!";
|
|
|
this.$notify.success({
|
|
|
title: title,
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
this.showModelThis = false;
|
|
|
this.$router.push("/supplierSellOut/supplierFiling");
|
|
@@ -1025,7 +1068,7 @@ export default {
|
|
|
price,
|
|
|
cgd_charge,
|
|
|
is_determine_price,
|
|
|
- expect_service_proportion,
|
|
|
+ expect_service_proportion
|
|
|
} = this.ruleForm;
|
|
|
const prop = is_determine_price === "1" ? "price" : "cgd_charge";
|
|
|
if (!expect_service_proportion) return;
|
|
@@ -1038,7 +1081,10 @@ export default {
|
|
|
this.ruleForm.expect_service =
|
|
|
Number(this.ruleForm[prop]) === 0 || !this.ruleForm[prop]
|
|
|
? "0"
|
|
|
- : accMul(accDiv(expect_service_proportion, 100), this.ruleForm[prop]);
|
|
|
+ : accMul(
|
|
|
+ accDiv(expect_service_proportion, 100),
|
|
|
+ this.ruleForm[prop]
|
|
|
+ );
|
|
|
this.$refs.ruleForm.validate("expect_service");
|
|
|
this.$forceUpdate();
|
|
|
}
|
|
@@ -1048,7 +1094,12 @@ export default {
|
|
|
if (this.$refs && this.$refs.ruleForm) {
|
|
|
this.ruleForm.expect_service = e;
|
|
|
this.$refs.ruleForm.validateField("expect_service");
|
|
|
- const { price, cgd_charge, is_determine_price, expect_service } = this.ruleForm;
|
|
|
+ const {
|
|
|
+ price,
|
|
|
+ cgd_charge,
|
|
|
+ is_determine_price,
|
|
|
+ expect_service
|
|
|
+ } = this.ruleForm;
|
|
|
if (!expect_service) return;
|
|
|
const prop = is_determine_price === "1" ? "price" : "cgd_charge";
|
|
|
const label = is_determine_price === "1" ? "销售价" : "裸价";
|
|
@@ -1078,6 +1129,84 @@ export default {
|
|
|
|
|
|
if (this.type === "add") {
|
|
|
this.ruleForm.customerCode = this.currentCompany;
|
|
|
+ } else if (this.type === "edit") {
|
|
|
+ this.loading = true;
|
|
|
+ const { code, data } = await asyncRequest.detail({
|
|
|
+ id: this.$route.query.id
|
|
|
+ });
|
|
|
+ this.loading = false;
|
|
|
+ if (code !== 0) return;
|
|
|
+
|
|
|
+ const {
|
|
|
+ companyName,
|
|
|
+ num,
|
|
|
+ is_determine_price,
|
|
|
+ customerCode,
|
|
|
+ customerName,
|
|
|
+ supplierName,
|
|
|
+ supplierNo,
|
|
|
+ cgd_charge,
|
|
|
+ price,
|
|
|
+ service_charge,
|
|
|
+ service_proportion,
|
|
|
+ good_name,
|
|
|
+ cat_info,
|
|
|
+ brand_name,
|
|
|
+ brand_id,
|
|
|
+ unit_id,
|
|
|
+ unit_name,
|
|
|
+ tax,
|
|
|
+ weight,
|
|
|
+ preservation_day,
|
|
|
+ delivery_day,
|
|
|
+ make_day,
|
|
|
+ origin_place,
|
|
|
+ delivery_place,
|
|
|
+ supply_area,
|
|
|
+ pay_way,
|
|
|
+ remark,
|
|
|
+ cost_desc,
|
|
|
+ good_img,
|
|
|
+ specinfo
|
|
|
+ } = data;
|
|
|
+
|
|
|
+ this.ruleForm = {
|
|
|
+ ...ruleForm1,
|
|
|
+ is_determine_price: is_determine_price || "",
|
|
|
+ companyName: companyName || "",
|
|
|
+ num: num || "",
|
|
|
+ customerCode: customerCode || "",
|
|
|
+ customerName: customerName || "",
|
|
|
+ supplierName: supplierName || "",
|
|
|
+ supplierNo: supplierNo ? [supplierNo] : "",
|
|
|
+ cgd_charge: cgd_charge || "",
|
|
|
+ service_charge: service_charge || "",
|
|
|
+ service_proportion: service_proportion || "",
|
|
|
+ cat_id: cat_info ? [cat_info[cat_info.length - 1].id] : "",
|
|
|
+ cat_id_name: cat_info
|
|
|
+ .map(({ name }, index) => (index === 0 ? name : `_${name}`))
|
|
|
+ .join(""),
|
|
|
+ good_name: good_name || "",
|
|
|
+ price: price || "",
|
|
|
+ brand_name: brand_name ? [brand_name] : "",
|
|
|
+ brand_id: brand_id ? [brand_id] : "",
|
|
|
+ unit_id: unit_id ? [unit_id] : "",
|
|
|
+ unit_name: unit_name ? [unit_name] : "",
|
|
|
+ tax: tax || "",
|
|
|
+ weight: weight || "",
|
|
|
+ preservation_day: preservation_day || "",
|
|
|
+ delivery_day: delivery_day || "",
|
|
|
+ make_day: make_day || "",
|
|
|
+ origin_place: origin_place || "",
|
|
|
+ delivery_place: delivery_place || "",
|
|
|
+ supply_area: supply_area || "",
|
|
|
+ pay_way: pay_way || "",
|
|
|
+ remark: remark || "",
|
|
|
+ cost_desc: cost_desc || "",
|
|
|
+ good_img: good_img || []
|
|
|
+ };
|
|
|
+
|
|
|
+ this.spec_tableData = specinfo;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -1256,47 +1385,8 @@ export default {
|
|
|
this.$message.error("图片大小不能超过 1MB!");
|
|
|
}
|
|
|
return isJPG && isLt2M;
|
|
|
- },
|
|
|
- resetFormData() {
|
|
|
- this.status = "";
|
|
|
- this.is_noble = false;
|
|
|
- this.cat_id_name = "";
|
|
|
- this.brand_name = "";
|
|
|
- this.unit_name = "";
|
|
|
- this.ruleForm = {
|
|
|
- companyName: "泰康",
|
|
|
- supplierNo: [],
|
|
|
- customerCode: [],
|
|
|
- is_determine_price: "0",
|
|
|
- num: "300",
|
|
|
- cgd_charge: "100",
|
|
|
- price: "0",
|
|
|
- expect_service_proportion: "10",
|
|
|
- expect_service: "0",
|
|
|
- good_name: "1",
|
|
|
- origin_place: [],
|
|
|
- delivery_place: [],
|
|
|
- cat_id: [],
|
|
|
- brand_id: [],
|
|
|
- unit_id: [],
|
|
|
- weight: "0.000",
|
|
|
- tax: "1",
|
|
|
- supply_area: "1",
|
|
|
- pay_way: "1",
|
|
|
- send_way: "1",
|
|
|
- preservation_day: "1", //有效期
|
|
|
- delivery_day: "0", //物流时间
|
|
|
- make_day: "0", //生产工期
|
|
|
- gold_weight: "0.000",
|
|
|
- noble_metal: "1",
|
|
|
- config: [],
|
|
|
- other_config: "1",
|
|
|
- remark: "1",
|
|
|
- cost_desc: "1",
|
|
|
- good_img: ["0"],
|
|
|
- };
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|