|
@@ -24,9 +24,7 @@
|
|
|
<search-sort
|
|
|
:value="ruleForm.cat_id"
|
|
|
:placeholder="'商品分类'"
|
|
|
- :disabled="
|
|
|
- type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
- "
|
|
|
+ :disabled="type === 'view' || type === 'editBase' || type === 'editCoin'"
|
|
|
:size="'mini'"
|
|
|
:names="cat_id_name"
|
|
|
:isDetail="type !== 'add'"
|
|
@@ -49,9 +47,7 @@
|
|
|
<search-work-company
|
|
|
:value="ruleForm.company_id"
|
|
|
:placeholder="'业务公司'"
|
|
|
- :disabled="
|
|
|
- type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
- "
|
|
|
+ :disabled="type === 'view' || type === 'editBase' || type === 'editCoin'"
|
|
|
:size="'mini'"
|
|
|
:isDetail="type !== 'add'"
|
|
|
@searchChange="company_idsearchChange"
|
|
@@ -121,9 +117,7 @@
|
|
|
<el-form-item label="税点" prop="tax" label-width="60px">
|
|
|
<search-tax
|
|
|
:value="ruleForm.tax"
|
|
|
- :disabled="
|
|
|
- type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
- "
|
|
|
+ :disabled="type === 'view' || type === 'editBase' || type === 'editCoin'"
|
|
|
:size="'mini'"
|
|
|
:isDetail="type !== 'add'"
|
|
|
:placeholder="'税点'"
|
|
@@ -169,9 +163,7 @@
|
|
|
v-model="ruleForm.is_stock"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="
|
|
|
- type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
- "
|
|
|
+ :disabled="type === 'view' || type === 'editBase' || type === 'editCoin'"
|
|
|
style="width: 100%"
|
|
|
placeholder="是否库存品"
|
|
|
>
|
|
@@ -187,20 +179,14 @@
|
|
|
<el-col :span="24" v-show="is_noble">
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
- label="贵金属重量"
|
|
|
- prop="noble_weight"
|
|
|
- label-width="95px"
|
|
|
- >
|
|
|
+ <el-form-item label="贵金属重量" prop="noble_weight" label-width="95px">
|
|
|
<digital-input
|
|
|
:values="ruleForm.noble_weight"
|
|
|
:placeholder="'贵金属重量'"
|
|
|
:name="'ruleForm.noble_weight'"
|
|
|
:min="0"
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- type === 'editBase' ||
|
|
|
- type === 'editCoin'
|
|
|
+ type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
"
|
|
|
:max="100000000000"
|
|
|
:position="'right'"
|
|
@@ -213,17 +199,11 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
- label="贵金属种类"
|
|
|
- prop="noble_metal"
|
|
|
- label-width="95px"
|
|
|
- >
|
|
|
+ <el-form-item label="贵金属种类" prop="noble_metal" label-width="95px">
|
|
|
<search-metal-kind
|
|
|
:value="ruleForm.noble_metal"
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- type === 'editBase' ||
|
|
|
- type === 'editCoin'
|
|
|
+ type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
"
|
|
|
:size="'mini'"
|
|
|
:isDetail="type !== 'add'"
|
|
@@ -243,9 +223,7 @@
|
|
|
filterable
|
|
|
clearable
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- type === 'editBase' ||
|
|
|
- type === 'editCoin'
|
|
|
+ type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
"
|
|
|
style="width: 100%"
|
|
|
placeholder="启用实时金价"
|
|
@@ -267,9 +245,7 @@
|
|
|
filterable
|
|
|
clearable
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- type === 'editBase' ||
|
|
|
- type === 'editCoin'
|
|
|
+ type === 'view' || type === 'editBase' || type === 'editCoin'
|
|
|
"
|
|
|
style="width: 100%"
|
|
|
placeholder="有无工差"
|
|
@@ -418,6 +394,23 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="备库起订量" prop="stock_moq" label-width="95px">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.stock_moq"
|
|
|
+ :placeholder="'备库起订量'"
|
|
|
+ :min="0"
|
|
|
+ :disabled="type === 'view' || type === 'editCoin'"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="0"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="''"
|
|
|
+ @reschange="number_change($event, 'stock_moq')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -432,12 +425,7 @@
|
|
|
</ul>
|
|
|
</el-col>
|
|
|
<el-col :span="23" class="dmain" style="padding: 20px 0 20px 18px">
|
|
|
- <el-table
|
|
|
- :data="spec_tableData"
|
|
|
- :size="'mini'"
|
|
|
- border
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-table :data="spec_tableData" :size="'mini'" border style="width: 100%">
|
|
|
<el-table-column prop="spec_value" label="规格类型" />
|
|
|
<el-table-column prop="spec_value_value" label="规格值" />
|
|
|
<el-table-column
|
|
@@ -473,10 +461,7 @@
|
|
|
content="删除"
|
|
|
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>
|
|
@@ -729,9 +714,7 @@
|
|
|
:multiple="true"
|
|
|
:uploadcondition="beforeAvatarUpload"
|
|
|
@UploadErrorEvent="UploadErrorEvent($event, 'good_thumb_img')"
|
|
|
- @UploadSuccessEvent="
|
|
|
- UploadSuccessEvent($event, 'good_thumb_img')
|
|
|
- "
|
|
|
+ @UploadSuccessEvent="UploadSuccessEvent($event, 'good_thumb_img')"
|
|
|
></file-upload>
|
|
|
</div>
|
|
|
<div class="txt-tips fl">
|
|
@@ -753,11 +736,7 @@
|
|
|
<div class="img-show-li-div">
|
|
|
<img :src="img" class="img-show" alt="" />
|
|
|
<i
|
|
|
- v-if="
|
|
|
- type == 'add' ||
|
|
|
- type === 'editBase' ||
|
|
|
- type === 'edit'
|
|
|
- "
|
|
|
+ v-if="type == 'add' || type === 'editBase' || type === 'edit'"
|
|
|
class="el-icon-close"
|
|
|
@click="closeImg(iindex, 'good_img')"
|
|
|
></i>
|
|
@@ -779,12 +758,8 @@
|
|
|
:accept="'.jpg,.png,.jpeg'"
|
|
|
:multiple="true"
|
|
|
:uploadcondition="beforeAvatarUpload"
|
|
|
- @UploadErrorEvent="
|
|
|
- UploadErrorEvent($event, 'good_img')
|
|
|
- "
|
|
|
- @UploadSuccessEvent="
|
|
|
- UploadSuccessEvent($event, 'good_img')
|
|
|
- "
|
|
|
+ @UploadErrorEvent="UploadErrorEvent($event, 'good_img')"
|
|
|
+ @UploadSuccessEvent="UploadSuccessEvent($event, 'good_img')"
|
|
|
></file-upload>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -806,11 +781,7 @@
|
|
|
<div class="img-show-li-div">
|
|
|
<img :src="img" class="img-show" alt="" />
|
|
|
<i
|
|
|
- v-if="
|
|
|
- type == 'add' ||
|
|
|
- type === 'editBase' ||
|
|
|
- type === 'edit'
|
|
|
- "
|
|
|
+ v-if="type == 'add' || type === 'editBase' || type === 'edit'"
|
|
|
class="el-icon-close"
|
|
|
@click="closeImg(iindex, 'good_info_img')"
|
|
|
></i>
|
|
@@ -832,9 +803,7 @@
|
|
|
:accept="'.jpg,.png,.jpeg'"
|
|
|
:multiple="true"
|
|
|
:uploadcondition="beforeAvatarUpload"
|
|
|
- @UploadErrorEvent="
|
|
|
- UploadErrorEvent($event, 'good_info_img')
|
|
|
- "
|
|
|
+ @UploadErrorEvent="UploadErrorEvent($event, 'good_info_img')"
|
|
|
@UploadSuccessEvent="
|
|
|
UploadSuccessEvent($event, 'good_info_img')
|
|
|
"
|
|
@@ -1063,25 +1032,16 @@
|
|
|
<el-col
|
|
|
:span="24"
|
|
|
v-if="
|
|
|
- type === 'editBase' ||
|
|
|
- type === 'add' ||
|
|
|
- type === 'editCoin' ||
|
|
|
- type === 'edit'
|
|
|
- "
|
|
|
- style="
|
|
|
- text-align: right;
|
|
|
- padding: 15px 0 15px 0;
|
|
|
- border-top: 1px solid #dcdfe6;
|
|
|
+ type === 'editBase' || type === 'add' || type === 'editCoin' || type === 'edit'
|
|
|
"
|
|
|
+ style="text-align: right; padding: 15px 0 15px 0; border-top: 1px solid #dcdfe6"
|
|
|
>
|
|
|
- <el-button :size="'mini'" type="primary" @click="submitForm"
|
|
|
- >保 存
|
|
|
- </el-button>
|
|
|
+ <el-button :size="'mini'" type="primary" @click="submitForm">保 存 </el-button>
|
|
|
</el-col></el-row
|
|
|
>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
- <script>
|
|
|
+<script>
|
|
|
import asyncRequest from "@/apis/service/goodStore/goodsCost";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import { mapGetters } from "vuex";
|
|
@@ -1111,9 +1071,8 @@ export default {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
powers() {
|
|
|
let tran =
|
|
|
- this.$store.getters.btnList.find(
|
|
|
- (item) => item.menu_route == "goodsCostAdd"
|
|
|
- ) || {};
|
|
|
+ this.$store.getters.btnList.find((item) => item.menu_route == "goodsCostAdd") ||
|
|
|
+ {};
|
|
|
if (tran && tran.action && tran.action.length > 0) {
|
|
|
return tran.action;
|
|
|
} else {
|
|
@@ -1274,9 +1233,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
if (!is_p) {
|
|
|
- this.$message.warning(
|
|
|
- "启用实时金价的贵金属商品不能填写成本单价!"
|
|
|
- );
|
|
|
+ this.$message.warning("启用实时金价的贵金属商品不能填写成本单价!");
|
|
|
this.loading = false;
|
|
|
return;
|
|
|
}
|
|
@@ -1365,9 +1322,7 @@ export default {
|
|
|
JSON.stringify(type === 1 ? this.spec_tableData : this.ladder_tableData)
|
|
|
);
|
|
|
let oldlist = JSON.parse(
|
|
|
- JSON.stringify(
|
|
|
- type === 1 ? this.old_spec_tableData : this.old_ladder_tableData
|
|
|
- )
|
|
|
+ JSON.stringify(type === 1 ? this.old_spec_tableData : this.old_ladder_tableData)
|
|
|
);
|
|
|
let hasIDlist = [];
|
|
|
list.forEach((a) => {
|
|
@@ -1641,8 +1596,7 @@ export default {
|
|
|
} catch (e) {}
|
|
|
|
|
|
return (
|
|
|
- (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
|
|
|
- Math.pow(10, m)
|
|
|
+ (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) / Math.pow(10, m)
|
|
|
);
|
|
|
},
|
|
|
dataSort(key) {
|
|
@@ -1813,9 +1767,7 @@ export default {
|
|
|
this.is_noble = isok;
|
|
|
|
|
|
let spec_list1 =
|
|
|
- speclist && speclist.length > 0
|
|
|
- ? JSON.parse(JSON.stringify(speclist))
|
|
|
- : [];
|
|
|
+ speclist && speclist.length > 0 ? JSON.parse(JSON.stringify(speclist)) : [];
|
|
|
spec_list1.forEach((a) => {
|
|
|
let model = {
|
|
|
id: a.id,
|
|
@@ -1828,18 +1780,12 @@ export default {
|
|
|
};
|
|
|
this.spec_tableData.push(model);
|
|
|
});
|
|
|
- this.old_spec_tableData = JSON.parse(
|
|
|
- JSON.stringify(this.spec_tableData)
|
|
|
- );
|
|
|
+ this.old_spec_tableData = JSON.parse(JSON.stringify(this.spec_tableData));
|
|
|
|
|
|
let list2 =
|
|
|
- nakelist && nakelist.length > 0
|
|
|
- ? JSON.parse(JSON.stringify(nakelist))
|
|
|
- : [];
|
|
|
+ nakelist && nakelist.length > 0 ? JSON.parse(JSON.stringify(nakelist)) : [];
|
|
|
this.ladder_tableData = list2;
|
|
|
- this.old_ladder_tableData = JSON.parse(
|
|
|
- JSON.stringify(this.ladder_tableData)
|
|
|
- );
|
|
|
+ this.old_ladder_tableData = JSON.parse(JSON.stringify(this.ladder_tableData));
|
|
|
this.status = status;
|
|
|
this.brand_name = brand_name;
|
|
|
this.unit_name = unit;
|
|
@@ -1847,8 +1793,7 @@ export default {
|
|
|
this.ruleForm = {
|
|
|
id: id || "",
|
|
|
spuCode: spuCode || "",
|
|
|
- cat_id:
|
|
|
- cat_id && cat_id.length > 0 ? [cat_id[cat_id.length - 1]] : [],
|
|
|
+ cat_id: cat_id && cat_id.length > 0 ? [cat_id[cat_id.length - 1]] : [],
|
|
|
brandid: brand_id ? [brand_id] : [],
|
|
|
noble_weight: noble_weight || "",
|
|
|
weight: weight || "",
|
|
@@ -1877,9 +1822,7 @@ export default {
|
|
|
good_size: good_size || "",
|
|
|
good_bar: good_bar || "",
|
|
|
supply_area: supply_area || "",
|
|
|
- delivery_place: delivery_place
|
|
|
- ? (delivery_place || "").split(",")
|
|
|
- : [],
|
|
|
+ delivery_place: delivery_place ? (delivery_place || "").split(",") : [],
|
|
|
origin_place: origin_place ? (origin_place || "").split(",") : [],
|
|
|
delivery_day: delivery_day || "",
|
|
|
lead_time: lead_time || "",
|
|
@@ -1891,8 +1834,7 @@ export default {
|
|
|
: (good_img || "").split(",")
|
|
|
: [],
|
|
|
good_info_img: good_info_img
|
|
|
- ? (Object.prototype.toString.call(good_info_img) ===
|
|
|
- "[object Array]"
|
|
|
+ ? (Object.prototype.toString.call(good_info_img) === "[object Array]"
|
|
|
? []
|
|
|
: good_info_img || ""
|
|
|
).split(",")
|
|
@@ -1926,8 +1868,7 @@ export default {
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
if (list[i] === "cgd_gold_price") {
|
|
|
const { is_gold_price } = this.ruleForm;
|
|
|
- this.rulesThis[list[i]][0].required =
|
|
|
- this.is_noble && is_gold_price === "1";
|
|
|
+ this.rulesThis[list[i]][0].required = this.is_noble && is_gold_price === "1";
|
|
|
console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
|
|
|
} else {
|
|
|
this.rulesThis[list[i]][0].required = this.is_noble;
|
|
@@ -2163,7 +2104,7 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
- <style lang="scss" scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
.goodsCostDetail {
|
|
|
// position: relative;
|
|
|
.good_info_img_div {
|
|
@@ -2218,4 +2159,3 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
-
|