|  | @@ -20,6 +20,12 @@
 | 
	
		
			
				|  |  |              <crop-select v-model="form.corpId" corpType="KH" :refresh="false" @getCorpData="getCorpData"
 | 
	
		
			
				|  |  |                :disabled="detailData.status == 1"></crop-select>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  | +          <template slot="warehouseId">
 | 
	
		
			
				|  |  | +            <el-cascader v-model="form.warehouseId" :options="storagetreeList" :show-all-levels="false"
 | 
	
		
			
				|  |  | +              :disabled="detailData.status == 1"
 | 
	
		
			
				|  |  | +              :props="{ checkStrictly: true, emitPath: false, label: 'title',multiple: true }" clearable>
 | 
	
		
			
				|  |  | +            </el-cascader>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  |          </avue-form>
 | 
	
		
			
				|  |  |        </basic-container>
 | 
	
		
			
				|  |  |        <containerTitle title="基础明细"></containerTitle>
 | 
	
	
		
			
				|  | @@ -30,6 +36,12 @@
 | 
	
		
			
				|  |  |              <el-button type="primary" @click="addRow" size="small" :disabled="detailData.status == 1">新增
 | 
	
		
			
				|  |  |              </el-button>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  | +          <template slot="feeId" slot-scope="{ row,index }">
 | 
	
		
			
				|  |  | +            <breakdown-select v-if="row.$cellEdit" v-model="row.feeId" @selectValue="value => selectValue(value,row)"
 | 
	
		
			
				|  |  | +              :configuration="breakConfiguration">
 | 
	
		
			
				|  |  | +            </breakdown-select>
 | 
	
		
			
				|  |  | +            <span v-else>{{ row.feeName }}</span>
 | 
	
		
			
				|  |  | +          </template>
 | 
	
		
			
				|  |  |            <template slot="menu" slot-scope="{ row, index }">
 | 
	
		
			
				|  |  |              <el-button size="small" type="text" @click="rowCell(row, index)" :disabled="detailData.status == 1">{{
 | 
	
		
			
				|  |  |              row.$cellEdit ? "保存" : "修改" }}</el-button>
 | 
	
	
		
			
				|  | @@ -46,7 +58,7 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |  import { optionList } from "./js/optionList";
 | 
	
		
			
				|  |  | -import { getDetail, submit } from "@/api/basicData/agreement";
 | 
	
		
			
				|  |  | +import { getDetail, submit, getStoragetree, getAllgoodstype, getLazylist } from "@/api/basicData/agreement";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "index",
 | 
	
		
			
				|  |  |    data() {
 | 
	
	
		
			
				|  | @@ -61,21 +73,57 @@ export default {
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "合同编号",
 | 
	
		
			
				|  |  |              prop: "contractNo",
 | 
	
		
			
				|  |  | +            rules: [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: "",
 | 
	
		
			
				|  |  | +                trigger: "blur"
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            ],
 | 
	
		
			
				|  |  |              span: 6,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "制单部门",
 | 
	
		
			
				|  |  |              prop: "deptId",
 | 
	
		
			
				|  |  | +            rules: [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: "",
 | 
	
		
			
				|  |  | +                trigger: "blur"
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            ],
 | 
	
		
			
				|  |  | +            type: "select",
 | 
	
		
			
				|  |  | +            dataType: "string",
 | 
	
		
			
				|  |  | +            props: {
 | 
	
		
			
				|  |  | +              label: "deptName",
 | 
	
		
			
				|  |  | +              value: "id"
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            dicData: [],
 | 
	
		
			
				|  |  |              span: 6,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "客户名称",
 | 
	
		
			
				|  |  |              prop: "corpId",
 | 
	
		
			
				|  |  | +            rules: [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: "",
 | 
	
		
			
				|  |  | +                trigger: "blur"
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            ],
 | 
	
		
			
				|  |  |              span: 6,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "贸易方式",
 | 
	
		
			
				|  |  | -            prop: "trademodeId",
 | 
	
		
			
				|  |  | +            prop: "billType",
 | 
	
		
			
				|  |  | +            type: "select",
 | 
	
		
			
				|  |  | +            dataType: "string",
 | 
	
		
			
				|  |  | +            props: {
 | 
	
		
			
				|  |  | +              label: "dictValue",
 | 
	
		
			
				|  |  | +              value: "dictKey"
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            dicData: [],
 | 
	
		
			
				|  |  | +            multiple: true,
 | 
	
		
			
				|  |  |              span: 6,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
	
		
			
				|  | @@ -95,14 +143,40 @@ export default {
 | 
	
		
			
				|  |  |              span: 6,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | +            label: "商品分类",
 | 
	
		
			
				|  |  | +            prop: "goodsId",
 | 
	
		
			
				|  |  | +            type: "select",
 | 
	
		
			
				|  |  | +            dataType: "string",
 | 
	
		
			
				|  |  | +            props: {
 | 
	
		
			
				|  |  | +              label: "cname",
 | 
	
		
			
				|  |  | +              value: "id"
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            dicData: [],
 | 
	
		
			
				|  |  | +            span: 6,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  |              label: "仓库",
 | 
	
		
			
				|  |  |              prop: "warehouseId",
 | 
	
		
			
				|  |  | +            // type: "cascader",
 | 
	
		
			
				|  |  | +            // dataType: "string",
 | 
	
		
			
				|  |  | +            // dicData: [],
 | 
	
		
			
				|  |  | +            // props: {
 | 
	
		
			
				|  |  | +            //   label: 'title',
 | 
	
		
			
				|  |  | +            //   value: 'id'
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // multiple: true,
 | 
	
		
			
				|  |  |              span: 6,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  |              label: "状态",
 | 
	
		
			
				|  |  |              prop: "billStatus",
 | 
	
		
			
				|  |  | -            disabled:true,
 | 
	
		
			
				|  |  | +            type: "select",
 | 
	
		
			
				|  |  | +            props: {
 | 
	
		
			
				|  |  | +              label: "dictValue",
 | 
	
		
			
				|  |  | +              value: "dictKey"
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            dicData: [],
 | 
	
		
			
				|  |  | +            disabled: true,
 | 
	
		
			
				|  |  |              span: 6,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |            {
 | 
	
	
		
			
				|  | @@ -111,7 +185,7 @@ export default {
 | 
	
		
			
				|  |  |              type: "textarea",
 | 
	
		
			
				|  |  |              minRows: 2,
 | 
	
		
			
				|  |  |              width: 120,
 | 
	
		
			
				|  |  | -            span: 24,
 | 
	
		
			
				|  |  | +            span: 18,
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |          ]
 | 
	
		
			
				|  |  |        },
 | 
	
	
		
			
				|  | @@ -122,7 +196,18 @@ export default {
 | 
	
		
			
				|  |  |        jobLevelList: [],
 | 
	
		
			
				|  |  |        occupationalLevelList: [],
 | 
	
		
			
				|  |  |        maritalList: [],
 | 
	
		
			
				|  |  | -      orderFilesList:[]
 | 
	
		
			
				|  |  | +      orderFilesList: [],
 | 
	
		
			
				|  |  | +      storagetreeList: [],
 | 
	
		
			
				|  |  | +      breakConfiguration: {
 | 
	
		
			
				|  |  | +        multipleChoices: false,
 | 
	
		
			
				|  |  | +        multiple: false,
 | 
	
		
			
				|  |  | +        disabled: false,
 | 
	
		
			
				|  |  | +        searchShow: true,
 | 
	
		
			
				|  |  | +        collapseTags: false,
 | 
	
		
			
				|  |  | +        clearable: true,
 | 
	
		
			
				|  |  | +        placeholder: "请点击右边按钮选择",
 | 
	
		
			
				|  |  | +        dicData: []
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    props: {
 | 
	
	
		
			
				|  | @@ -144,17 +229,50 @@ export default {
 | 
	
		
			
				|  |  |      this.getWorkDicts("result_type").then(res => {
 | 
	
		
			
				|  |  |        this.resultList = res.data.data;
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | +    this.getWorkDicts("trading_type").then(res => {
 | 
	
		
			
				|  |  | +      this.findObject(this.option.column, "billType").dicData =
 | 
	
		
			
				|  |  | +        res.data.data;
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    this.getWorkDicts("unit").then(res => {
 | 
	
		
			
				|  |  | +      this.findObject(this.optionList.column, "feeUnitId").dicData =
 | 
	
		
			
				|  |  | +        res.data.data;
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    this.getWorkDicts("bill_status").then(res => {
 | 
	
		
			
				|  |  | +      this.findObject(this.option.column, "billSdtatus").dicData = res.data.data;
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    getStoragetree().then(res => {
 | 
	
		
			
				|  |  | +      this.storagetreeList = res.data.data;
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    getAllgoodstype().then(res => {
 | 
	
		
			
				|  |  | +      this.findObject(this.option.column, "goodsId").dicData =
 | 
	
		
			
				|  |  | +        res.data.data;
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    getLazylist().then(res => {
 | 
	
		
			
				|  |  | +      this.findObject(this.option.column, "deptId").dicData =
 | 
	
		
			
				|  |  | +        res.data.data;
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      cellStyle() {
 | 
	
		
			
				|  |  |        return "padding:0;height:40px;";
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    selectValue(value,row) {
 | 
	
		
			
				|  |  | +      console.log(value,row)
 | 
	
		
			
				|  |  | +      if(row.feeId){
 | 
	
		
			
				|  |  | +        row.feeName=value.cname
 | 
	
		
			
				|  |  | +      }else{
 | 
	
		
			
				|  |  | +        row.feeName=""
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      getDetail(id) {
 | 
	
		
			
				|  |  |        getDetail(id)
 | 
	
		
			
				|  |  |          .then(res => {
 | 
	
		
			
				|  |  | +          if (res.data.data.warehouseId) {
 | 
	
		
			
				|  |  | +            res.data.data.warehouseId = res.data.data.warehouseId.split(',')
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |            this.form = res.data.data;
 | 
	
		
			
				|  |  |            this.dataList = res.data.data.agreementitemsList;
 | 
	
		
			
				|  |  | -          this.orderFilesList=res.data.data.orderFilesList
 | 
	
		
			
				|  |  | +          this.orderFilesList = res.data.data.orderFilesList
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |          .finally(() => {
 | 
	
		
			
				|  |  |            // this.loading = false;
 | 
	
	
		
			
				|  | @@ -162,7 +280,7 @@ export default {
 | 
	
		
			
				|  |  |            // this.pageLoading = false;
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getCorpData(row){
 | 
	
		
			
				|  |  | +    getCorpData(row) {
 | 
	
		
			
				|  |  |        this.form.corpName = row.cname
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      addRow() {
 | 
	
	
		
			
				|  | @@ -204,13 +322,21 @@ export default {
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid, done) => {
 | 
	
		
			
				|  |  |          done();
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  | +          if (this.form.warehouseId) {
 | 
	
		
			
				|  |  | +            console.log(this.form.warehouseId)
 | 
	
		
			
				|  |  | +            this.form.warehouseId = this.form.warehouseId.join(',')
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |            this.loadingBtn = true;
 | 
	
		
			
				|  |  |            submit({ ...this.form, agreementitemsList: this.dataList })
 | 
	
		
			
				|  |  |              .then(res => {
 | 
	
		
			
				|  |  |                this.$message.success("保存成功");
 | 
	
		
			
				|  |  | +              if (res.data.data.data.warehouseId) {
 | 
	
		
			
				|  |  | +                res.data.data.data.warehouseId = res.data.data.data.warehouseId.split(',')
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +              console.log()
 | 
	
		
			
				|  |  |                this.form = res.data.data.data;
 | 
	
		
			
				|  |  |                this.dataList = res.data.data.data.agreementitemsList;
 | 
	
		
			
				|  |  | -              this.orderFilesList=res.data.data.orderFilesList
 | 
	
		
			
				|  |  | +              this.orderFilesList = res.data.data.orderFilesList
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |              .finally(() => {
 | 
	
		
			
				|  |  |                this.loadingBtn = false;
 |