|
@@ -93,8 +93,7 @@
|
|
|
remote
|
|
|
clearable
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- (type === 'edit' && ruleForm.is_project === '1')
|
|
|
+ type === 'view' || (type === 'edit' && ruleForm.is_project === '1')
|
|
|
"
|
|
|
:multiple-limit="1"
|
|
|
reserve-keyword
|
|
@@ -182,9 +181,8 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(
|
|
|
- statusOptions.find(
|
|
|
- (item) => item.value == scope.row.good_type
|
|
|
- ) || {}
|
|
|
+ statusOptions.find((item) => item.value == scope.row.good_type) ||
|
|
|
+ {}
|
|
|
).label || '--'
|
|
|
"
|
|
|
></el-tag
|
|
@@ -222,8 +220,7 @@
|
|
|
type="date"
|
|
|
style="width: 100%"
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- (type === 'edit' && ruleForm.is_project === '1')
|
|
|
+ type === 'view' || (type === 'edit' && ruleForm.is_project === '1')
|
|
|
"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
:picker-options="pickerOptions1"
|
|
@@ -261,8 +258,7 @@
|
|
|
:precision="2"
|
|
|
:size="'mini'"
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- (type === 'edit' && ruleForm.is_project === '1')
|
|
|
+ type === 'view' || (type === 'edit' && ruleForm.is_project === '1')
|
|
|
"
|
|
|
:controls="false"
|
|
|
:append="'元'"
|
|
@@ -281,8 +277,7 @@
|
|
|
:precision="0"
|
|
|
:size="'mini'"
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- (type === 'edit' && ruleForm.is_project === '1')
|
|
|
+ type === 'view' || (type === 'edit' && ruleForm.is_project === '1')
|
|
|
"
|
|
|
:controls="false"
|
|
|
:append="''"
|
|
@@ -412,11 +407,7 @@
|
|
|
>
|
|
|
<el-table-column prop="spec_name" label="规格类型" />
|
|
|
<el-table-column prop="spec_value_name" label="规格值" />
|
|
|
- <el-table-column
|
|
|
- fixed="right"
|
|
|
- width="88px"
|
|
|
- v-if="type !== 'view'"
|
|
|
- >
|
|
|
+ <el-table-column fixed="right" width="88px" v-if="type !== 'view'">
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
<span>操作</span>
|
|
|
<el-tooltip
|
|
@@ -528,15 +519,11 @@
|
|
|
:src="ruleForm.good_img"
|
|
|
class="avatar"
|
|
|
/>
|
|
|
- <i
|
|
|
- v-else
|
|
|
- class="el-icon-plus avatar-uploader-icon"
|
|
|
- ></i>
|
|
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
<file-upload
|
|
|
class="Upload"
|
|
|
:disabled="
|
|
|
- type === 'view' ||
|
|
|
- (type !== 'view' && ruleForm.p_good_img)
|
|
|
+ type === 'view' || (type !== 'view' && ruleForm.p_good_img)
|
|
|
"
|
|
|
:accept="'.jpg,.png,.jpeg'"
|
|
|
:multiple="true"
|
|
@@ -558,14 +545,8 @@
|
|
|
prop="enclosure_file"
|
|
|
class="activity-upload"
|
|
|
>
|
|
|
- <div
|
|
|
- v-if="ruleForm && ruleForm.enclosure_file"
|
|
|
- class="clearfix tl"
|
|
|
- >
|
|
|
- <a
|
|
|
- :href="ruleForm.enclosure_file"
|
|
|
- download="附件"
|
|
|
- class="fl"
|
|
|
+ <div v-if="ruleForm && ruleForm.enclosure_file" class="clearfix tl">
|
|
|
+ <a :href="ruleForm.enclosure_file" download="附件" class="fl"
|
|
|
>点击下载</a
|
|
|
>
|
|
|
|
|
@@ -589,9 +570,7 @@
|
|
|
:multiple="false"
|
|
|
:uploadcondition="beforeOtherUpload"
|
|
|
@UploadErrorEvent="UploadErrorOtherenclosure_file"
|
|
|
- @UploadSuccessEvent="
|
|
|
- UploadSuccessOtherenclosure_file
|
|
|
- "
|
|
|
+ @UploadSuccessEvent="UploadSuccessOtherenclosure_file"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="txt-tips fl">
|
|
@@ -679,7 +658,7 @@ import resToken from "@/mixins/resToken";
|
|
|
import { edutRules } from "../columns";
|
|
|
import baseFormAddEdit from "./baseFormAddEdit";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-
|
|
|
+import { accMul } from "@/utils/validate";
|
|
|
export default {
|
|
|
name: "handover",
|
|
|
props: ["id", "sitem", "newTime", "type"],
|
|
@@ -815,23 +794,6 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- //乘法精度问题
|
|
|
- accMul(arg1, arg2) {
|
|
|
- var m = 0,
|
|
|
- s1 = arg1.toString(),
|
|
|
- s2 = arg2.toString();
|
|
|
- try {
|
|
|
- m += s1.split(".")[1].length;
|
|
|
- } catch (e) {}
|
|
|
- try {
|
|
|
- m += s2.split(".")[1].length;
|
|
|
- } catch (e) {}
|
|
|
- return (
|
|
|
- (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
|
|
|
- Math.pow(10, m)
|
|
|
- );
|
|
|
- },
|
|
|
-
|
|
|
async initForm() {
|
|
|
this.loading = true;
|
|
|
this.status = "";
|
|
@@ -852,8 +814,7 @@ export default {
|
|
|
this.$refs.ruleForm.validateField(key);
|
|
|
},
|
|
|
sch_is_noble() {
|
|
|
- this.rulesThis["projectNo"][0].required =
|
|
|
- this.ruleForm.is_project === "1";
|
|
|
+ this.rulesThis["projectNo"][0].required = this.ruleForm.is_project === "1";
|
|
|
this.$refs.ruleForm.validateField("projectNo");
|
|
|
let list = [
|
|
|
"config",
|
|
@@ -931,9 +892,7 @@ export default {
|
|
|
this.unit_name = unit_name;
|
|
|
this.brand_name = brand;
|
|
|
this.spec_tableData =
|
|
|
- specinfo && specinfo.length > 0
|
|
|
- ? JSON.parse(JSON.stringify(specinfo))
|
|
|
- : [];
|
|
|
+ specinfo && specinfo.length > 0 ? JSON.parse(JSON.stringify(specinfo)) : [];
|
|
|
this.cat_id_name = "";
|
|
|
if (can && can.length > 0) {
|
|
|
can.forEach((s, i) => {
|
|
@@ -972,8 +931,7 @@ export default {
|
|
|
budget_price: budget_price || "0.00",
|
|
|
num: num || "0",
|
|
|
brand_id: brand_id ? [brand_id] : [],
|
|
|
- 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]] : [],
|
|
|
good_img: good_img || "",
|
|
|
good_name: good_name || "",
|
|
|
total_weight: total_weight || "0",
|