|  | @@ -3,20 +3,20 @@
 | 
	
		
			
				|  |  |      <div class="customer-head">
 | 
	
		
			
				|  |  |        <div class="customer-back">
 | 
	
		
			
				|  |  |          <el-button
 | 
	
		
			
				|  |  | -          type="danger"
 | 
	
		
			
				|  |  | -          style="border: none;background: none;color: red"
 | 
	
		
			
				|  |  | -          icon="el-icon-arrow-left"
 | 
	
		
			
				|  |  | -          @click="backToList"
 | 
	
		
			
				|  |  | -          >返回列表
 | 
	
		
			
				|  |  | +            type="danger"
 | 
	
		
			
				|  |  | +            style="border: none;background: none;color: red"
 | 
	
		
			
				|  |  | +            icon="el-icon-arrow-left"
 | 
	
		
			
				|  |  | +            @click="backToList"
 | 
	
		
			
				|  |  | +        >返回列表
 | 
	
		
			
				|  |  |          </el-button>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <el-button
 | 
	
		
			
				|  |  | -        class="el-button--small-yh add-customer-btn"
 | 
	
		
			
				|  |  | -        type="primary"
 | 
	
		
			
				|  |  | -        :disabled="disabled"
 | 
	
		
			
				|  |  | -        @click="editProductInfo"
 | 
	
		
			
				|  |  | -        size="small"
 | 
	
		
			
				|  |  | -        >{{ form.id ? "确认修改" : "确认新增" }}
 | 
	
		
			
				|  |  | +          class="el-button--small-yh add-customer-btn"
 | 
	
		
			
				|  |  | +          type="primary"
 | 
	
		
			
				|  |  | +          :disabled="disabled"
 | 
	
		
			
				|  |  | +          @click="editProductInfo"
 | 
	
		
			
				|  |  | +          size="small"
 | 
	
		
			
				|  |  | +      >{{ form.id ? "确认修改" : "确认新增" }}
 | 
	
		
			
				|  |  |        </el-button>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div style="margin-top: 60px">
 | 
	
	
		
			
				|  | @@ -25,107 +25,113 @@
 | 
	
		
			
				|  |  |          <avue-form ref="form" v-model="form" :option="option">
 | 
	
		
			
				|  |  |            <template slot="goodsTypeId" slot-scope="scope">
 | 
	
		
			
				|  |  |              <avue-input-tree
 | 
	
		
			
				|  |  | -              v-model="form.goodsTypeId"
 | 
	
		
			
				|  |  | -              :props="{ label: 'title', value: 'id' }"
 | 
	
		
			
				|  |  | -              multiple
 | 
	
		
			
				|  |  | -              placeholder=" "
 | 
	
		
			
				|  |  | -              type="tree"
 | 
	
		
			
				|  |  | -              :dic="dicData"
 | 
	
		
			
				|  |  | +                v-model="form.goodsTypeId"
 | 
	
		
			
				|  |  | +                :props="{ label: 'title', value: 'id' }"
 | 
	
		
			
				|  |  | +                multiple
 | 
	
		
			
				|  |  | +                placeholder=" "
 | 
	
		
			
				|  |  | +                type="tree"
 | 
	
		
			
				|  |  | +                :dic="dicData"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="corpId" slot-scope="scope">
 | 
	
		
			
				|  |  |              <selectComponent
 | 
	
		
			
				|  |  | -              v-model="form.corpId"
 | 
	
		
			
				|  |  | -              :configuration="configuration"
 | 
	
		
			
				|  |  | -              style="width: 100%"
 | 
	
		
			
				|  |  | -              typeData="GYS"
 | 
	
		
			
				|  |  | +                v-model="form.corpId"
 | 
	
		
			
				|  |  | +                :configuration="configuration"
 | 
	
		
			
				|  |  | +                style="width: 100%"
 | 
	
		
			
				|  |  | +                typeData="GYS"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="artsVision">
 | 
	
		
			
				|  |  |              <crop-select
 | 
	
		
			
				|  |  | -              v-model="form.artsVision"
 | 
	
		
			
				|  |  | -              @getCorpData="getCorpName"
 | 
	
		
			
				|  |  | -              @getCorpList="getCorpList"
 | 
	
		
			
				|  |  | -              corpType="GS"
 | 
	
		
			
				|  |  | -              :multiple="true"
 | 
	
		
			
				|  |  | -              :collapseTags="true"
 | 
	
		
			
				|  |  | +                v-model="form.artsVision"
 | 
	
		
			
				|  |  | +                @getCorpData="getCorpName"
 | 
	
		
			
				|  |  | +                @getCorpList="getCorpList"
 | 
	
		
			
				|  |  | +                corpType="GS"
 | 
	
		
			
				|  |  | +                :multiple="true"
 | 
	
		
			
				|  |  | +                :collapseTags="true"
 | 
	
		
			
				|  |  |              ></crop-select>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="brand">
 | 
	
		
			
				|  |  |              <el-select
 | 
	
		
			
				|  |  | -              v-model="form.brand"
 | 
	
		
			
				|  |  | -              clearable
 | 
	
		
			
				|  |  | -              filterable
 | 
	
		
			
				|  |  | -              placeholder="请选择 品牌"
 | 
	
		
			
				|  |  | +                v-model="form.brand"
 | 
	
		
			
				|  |  | +                clearable
 | 
	
		
			
				|  |  | +                filterable
 | 
	
		
			
				|  |  | +                placeholder="请选择 品牌"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  |                <el-option
 | 
	
		
			
				|  |  | -                v-for="(item, index) in brandOption"
 | 
	
		
			
				|  |  | -                :key="index"
 | 
	
		
			
				|  |  | -                :label="item.dictValue"
 | 
	
		
			
				|  |  | -                :value="item.dictValue"
 | 
	
		
			
				|  |  | +                  v-for="(item, index) in brandOption"
 | 
	
		
			
				|  |  | +                  :key="index"
 | 
	
		
			
				|  |  | +                  :label="item.dictValue"
 | 
	
		
			
				|  |  | +                  :value="item.dictValue"
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  |              </el-select>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="cntrVolumn">
 | 
	
		
			
				|  |  |              <el-input
 | 
	
		
			
				|  |  | -              v-input-limit="2"
 | 
	
		
			
				|  |  | -              v-model="form.cntrVolumn"
 | 
	
		
			
				|  |  | -              clearable
 | 
	
		
			
				|  |  | -              placeholder="请输入 箱立方"
 | 
	
		
			
				|  |  | +                v-input-limit="2"
 | 
	
		
			
				|  |  | +                v-model="form.cntrVolumn"
 | 
	
		
			
				|  |  | +                clearable
 | 
	
		
			
				|  |  | +                placeholder="请输入 箱立方"
 | 
	
		
			
				|  |  |              ></el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="cartonWeight">
 | 
	
		
			
				|  |  |              <el-input
 | 
	
		
			
				|  |  | -              v-input-limit="2"
 | 
	
		
			
				|  |  | -              v-model="form.cartonWeight"
 | 
	
		
			
				|  |  | -              clearable
 | 
	
		
			
				|  |  | -              placeholder="请输入 箱重量"
 | 
	
		
			
				|  |  | +                v-input-limit="2"
 | 
	
		
			
				|  |  | +                v-model="form.cartonWeight"
 | 
	
		
			
				|  |  | +                clearable
 | 
	
		
			
				|  |  | +                placeholder="请输入 箱重量"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  |                <template slot="append">kg</template>
 | 
	
		
			
				|  |  |              </el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="integralMultiples">
 | 
	
		
			
				|  |  |              <el-input
 | 
	
		
			
				|  |  | -              v-input-limit="2"
 | 
	
		
			
				|  |  | -              v-model="form.integralMultiples"
 | 
	
		
			
				|  |  | -              clearable
 | 
	
		
			
				|  |  | -              placeholder="请输入 积分倍数"
 | 
	
		
			
				|  |  | +                v-input-limit="2"
 | 
	
		
			
				|  |  | +                v-model="form.integralMultiples"
 | 
	
		
			
				|  |  | +                clearable
 | 
	
		
			
				|  |  | +                placeholder="请输入 积分倍数"
 | 
	
		
			
				|  |  |              ></el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="integral">
 | 
	
		
			
				|  |  |              <el-input
 | 
	
		
			
				|  |  | -              v-input-limit="2"
 | 
	
		
			
				|  |  | -              v-model="form.integral"
 | 
	
		
			
				|  |  | -              clearable
 | 
	
		
			
				|  |  | -              placeholder="请输入 兑换积分"
 | 
	
		
			
				|  |  | +                v-input-limit="2"
 | 
	
		
			
				|  |  | +                v-model="form.integral"
 | 
	
		
			
				|  |  | +                clearable
 | 
	
		
			
				|  |  | +                placeholder="请输入 兑换积分"
 | 
	
		
			
				|  |  |              ></el-input>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="batch">
 | 
	
		
			
				|  |  |              <el-switch
 | 
	
		
			
				|  |  | -              v-model="form.batch"
 | 
	
		
			
				|  |  | -              active-text="是"
 | 
	
		
			
				|  |  | -              inactive-text="否"
 | 
	
		
			
				|  |  | -              :active-value="1"
 | 
	
		
			
				|  |  | -              :inactive-value="0"
 | 
	
		
			
				|  |  | +                v-model="form.batch"
 | 
	
		
			
				|  |  | +                active-text="是"
 | 
	
		
			
				|  |  | +                inactive-text="否"
 | 
	
		
			
				|  |  | +                :active-value="1"
 | 
	
		
			
				|  |  | +                :inactive-value="0"
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |            <template slot="unit">
 | 
	
		
			
				|  |  |              <el-select
 | 
	
		
			
				|  |  | -              v-model="form.unit"
 | 
	
		
			
				|  |  | -              clearable
 | 
	
		
			
				|  |  | -              filterable
 | 
	
		
			
				|  |  | -              placeholder="请选择 计量单位"
 | 
	
		
			
				|  |  | +                v-model="form.unit"
 | 
	
		
			
				|  |  | +                clearable
 | 
	
		
			
				|  |  | +                filterable
 | 
	
		
			
				|  |  | +                placeholder="请选择 计量单位"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  |                <el-option
 | 
	
		
			
				|  |  | -                v-for="(item, index) in unitOption"
 | 
	
		
			
				|  |  | -                :key="index"
 | 
	
		
			
				|  |  | -                :label="item.dictValue"
 | 
	
		
			
				|  |  | -                :value="item.dictValue"
 | 
	
		
			
				|  |  | +                  v-for="(item, index) in unitOption"
 | 
	
		
			
				|  |  | +                  :key="index"
 | 
	
		
			
				|  |  | +                  :label="item.dictValue"
 | 
	
		
			
				|  |  | +                  :value="item.dictValue"
 | 
	
		
			
				|  |  |                />
 | 
	
		
			
				|  |  |              </el-select>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </avue-form>
 | 
	
		
			
				|  |  |        </basic-container>
 | 
	
		
			
				|  |  | +      <containerTitle title="主图附件"></containerTitle>
 | 
	
		
			
				|  |  | +      <c-upload
 | 
	
		
			
				|  |  | +          :data="bankOfDepositData"
 | 
	
		
			
				|  |  | +          display
 | 
	
		
			
				|  |  | +          deleteUrl="/api/blade-client/goodsfiles/delete"
 | 
	
		
			
				|  |  | +          :enumerationValue="160"/>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
	
		
			
				|  | @@ -138,8 +144,8 @@ import {
 | 
	
		
			
				|  |  |  } from "@/api/basicData/commodityType";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  props:{
 | 
	
		
			
				|  |  | -    detailData:Object
 | 
	
		
			
				|  |  | +  props: {
 | 
	
		
			
				|  |  | +    detailData: Object
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    name: "detailsPage",
 | 
	
		
			
				|  |  |    data() {
 | 
	
	
		
			
				|  | @@ -151,7 +157,9 @@ export default {
 | 
	
		
			
				|  |  |          placeholder: "请点击右边按钮选择",
 | 
	
		
			
				|  |  |          dicData: []
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      optionTwo:[],
 | 
	
		
			
				|  |  |        form: {},
 | 
	
		
			
				|  |  | +      bankOfDepositData:[],
 | 
	
		
			
				|  |  |        disabled: false,
 | 
	
		
			
				|  |  |        userDialog: false, //供应商导入窗口
 | 
	
		
			
				|  |  |        dicData: [],
 | 
	
	
		
			
				|  | @@ -229,7 +237,7 @@ export default {
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "供应商",
 | 
	
		
			
				|  |  |              prop: "corpId",
 | 
	
		
			
				|  |  | -            span:16,
 | 
	
		
			
				|  |  | +            span: 16,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: true,
 | 
	
	
		
			
				|  | @@ -253,7 +261,7 @@ export default {
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "所属公司",
 | 
	
		
			
				|  |  |              prop: "artsVision",
 | 
	
		
			
				|  |  | -            span:16,
 | 
	
		
			
				|  |  | +            span: 16,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -424,7 +432,9 @@ export default {
 | 
	
		
			
				|  |  |        this.openFullScreen(false, '正在努力的加载...');
 | 
	
		
			
				|  |  |        getDetail(id).then(res => {
 | 
	
		
			
				|  |  |          this.form = res.data.data;
 | 
	
		
			
				|  |  | -        this.form.artsVision = this.form.artsVision? this.form.artsVision.split(','): null;
 | 
	
		
			
				|  |  | +        this.bankOfDepositData = res.data.data.filesList
 | 
	
		
			
				|  |  | +        delete this.form.filesList
 | 
	
		
			
				|  |  | +        this.form.artsVision = this.form.artsVision ? this.form.artsVision.split(',') : null;
 | 
	
		
			
				|  |  |        }).finally(() => {
 | 
	
		
			
				|  |  |          this.openFullScreen(true);
 | 
	
		
			
				|  |  |        });
 | 
	
	
		
			
				|  | @@ -447,6 +457,22 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //修改提交触发
 | 
	
		
			
				|  |  |      editProductInfo() {
 | 
	
		
			
				|  |  | +      let list = []
 | 
	
		
			
				|  |  | +      if(this.bankOfDepositData.length>0){
 | 
	
		
			
				|  |  | +        for (let item of this.bankOfDepositData){
 | 
	
		
			
				|  |  | +          if (item.version == 0){
 | 
	
		
			
				|  |  | +            list.push(item.version)
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }else {
 | 
	
		
			
				|  |  | +        return this.$message.error("请上传附件!");
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (!(list.indexOf('0') !== -1)){
 | 
	
		
			
				|  |  | +        return this.$message.error("附件无主图,请选择其中一个文件属性为主图!");
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (new Set(list).size !== list.length){
 | 
	
		
			
				|  |  | +        return this.$message.error("主图重复");
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid, done) => {
 | 
	
		
			
				|  |  |          done();
 | 
	
		
			
				|  |  |          //校验明细列表
 | 
	
	
		
			
				|  | @@ -465,6 +491,7 @@ export default {
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            const params = {
 | 
	
		
			
				|  |  |              ...this.form,
 | 
	
		
			
				|  |  | +            filesList:this.bankOfDepositData,
 | 
	
		
			
				|  |  |              type: 0
 | 
	
		
			
				|  |  |            };
 | 
	
		
			
				|  |  |            this.openFullScreen(false, '正在努力的加载...');
 |