|  | @@ -140,7 +140,7 @@
 | 
	
		
			
				|  |  |        <span slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  |            <el-button @click="dialogVisible = false">取 消</el-button>
 | 
	
		
			
				|  |  |             <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
 | 
	
		
			
				|  |  | -          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1">导入</el-button>
 | 
	
		
			
				|  |  | +          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>
 | 
	
		
			
				|  |  |            <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"
 | 
	
		
			
				|  |  |                       :disabled="tableData.length !== 1">导入</el-button>
 | 
	
		
			
				|  |  |          </span>
 | 
	
	
		
			
				|  | @@ -181,7 +181,7 @@ export default {
 | 
	
		
			
				|  |  |          multipleChoices:false,
 | 
	
		
			
				|  |  |          multiple:false,
 | 
	
		
			
				|  |  |          disabled:false,
 | 
	
		
			
				|  |  | -        searchShow:false,
 | 
	
		
			
				|  |  | +        searchShow:true,
 | 
	
		
			
				|  |  |          collapseTags:false,
 | 
	
		
			
				|  |  |          placeholder:'请点击右边按钮选择',
 | 
	
		
			
				|  |  |          dicData:[]
 | 
	
	
		
			
				|  | @@ -190,7 +190,7 @@ export default {
 | 
	
		
			
				|  |  |          multipleChoices:false,
 | 
	
		
			
				|  |  |          multiple:false,
 | 
	
		
			
				|  |  |          disabled:false,
 | 
	
		
			
				|  |  | -        searchShow:false,
 | 
	
		
			
				|  |  | +        searchShow:true,
 | 
	
		
			
				|  |  |          collapseTags:false,
 | 
	
		
			
				|  |  |          placeholder:'请点击右边按钮选择',
 | 
	
		
			
				|  |  |          dicData:[]
 | 
	
	
		
			
				|  | @@ -349,15 +349,16 @@ export default {
 | 
	
		
			
				|  |  |          this.$set(this.form,"sysNo", res.data.data)
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    if(this.$route.query.params){
 | 
	
		
			
				|  |  | -      detailListData(this.$route.query.params.id).then(res =>{
 | 
	
		
			
				|  |  | +    if(this.detailData.params){
 | 
	
		
			
				|  |  | +      detailListData(this.detailData.params.id).then(res =>{
 | 
	
		
			
				|  |  |          this.form.orderNo =  res.data.data.orderNo;
 | 
	
		
			
				|  |  |          res.data.data.itemsVOList.forEach((item,index) =>{
 | 
	
		
			
				|  |  | -          this.$route.query.params.orderItemIds.forEach((e,i) =>{
 | 
	
		
			
				|  |  | +          this.detailData.params.orderItemIds.forEach((e,i) =>{
 | 
	
		
			
				|  |  |              if(e ==  index){
 | 
	
		
			
				|  |  |                item.contractNumber =  res.data.data.orderNo;
 | 
	
		
			
				|  |  |                item.actualQuantity =  item.purchaseQuantity;
 | 
	
		
			
				|  |  |                item.contractAmount =  item.amount;
 | 
	
		
			
				|  |  | +              delete item.id
 | 
	
		
			
				|  |  |                this.$refs.crudContact.rowCellAdd(item);
 | 
	
		
			
				|  |  |                this.$refs.crudContact.rowCell(item,this.contactsData.length - 1)
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -431,7 +432,7 @@ export default {
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //修改提交触发
 | 
	
		
			
				|  |  | -    editCustomer() {
 | 
	
		
			
				|  |  | +    editCustomer(status) {
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid) => {
 | 
	
		
			
				|  |  |          for (let i = 0; i < this.contactsData.length; i++) {
 | 
	
		
			
				|  |  |            if (this.contactsData[i].billNo == null) {
 | 
	
	
		
			
				|  | @@ -458,6 +459,9 @@ export default {
 | 
	
		
			
				|  |  |                })
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  | +          if(status === true){
 | 
	
		
			
				|  |  | +            this.$emit("goBack");
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |            return false;
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -581,7 +585,15 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //返回列表
 | 
	
		
			
				|  |  |      backToList() {
 | 
	
		
			
				|  |  | -      this.$emit("goBack");
 | 
	
		
			
				|  |  | +      this.$confirm("是否保存当前页面?", "提示", {
 | 
	
		
			
				|  |  | +        confirmButtonText: "保存",
 | 
	
		
			
				|  |  | +        cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        type: "warning",
 | 
	
		
			
				|  |  | +      }).then(() => {
 | 
	
		
			
				|  |  | +        this.editCustomer(true)
 | 
	
		
			
				|  |  | +      }).catch(() => {
 | 
	
		
			
				|  |  | +        this.$emit("goBack");
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  }
 |