|  | @@ -39,35 +39,34 @@
 | 
	
		
			
				|  |  |          <containerTitle title="采购明细"></containerTitle>
 | 
	
		
			
				|  |  |          <basic-container style="margin-bottom: 10px">
 | 
	
		
			
				|  |  |            <avue-crud
 | 
	
		
			
				|  |  | -            :option="detailedList"
 | 
	
		
			
				|  |  | -            :data="detailedData"
 | 
	
		
			
				|  |  | -            ref="detailedList"
 | 
	
		
			
				|  |  | -            @row-save="rowSaveProject"
 | 
	
		
			
				|  |  | -            @row-update="rowUpdateProject"
 | 
	
		
			
				|  |  | -            @row-del="rowDelProject"
 | 
	
		
			
				|  |  | +            :option="customerContact"
 | 
	
		
			
				|  |  | +            v-model="contactsForm"
 | 
	
		
			
				|  |  | +            :data="contactsData"
 | 
	
		
			
				|  |  | +            ref="crudContact"
 | 
	
		
			
				|  |  | +            @row-save="rowSave"
 | 
	
		
			
				|  |  | +            @row-click="handleRowClick"
 | 
	
		
			
				|  |  | +            @row-update="rowUpdate"
 | 
	
		
			
				|  |  | +            @row-del="rowDel"
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  | +            <template slot="code" slot-scope="{row,index}">
 | 
	
		
			
				|  |  | +              <span style="float: left;padding-top: 2px">{{ row.code }}</span>
 | 
	
		
			
				|  |  | +              <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  |              <template slot-scope="{row,index}" slot="menu">
 | 
	
		
			
				|  |  |                <el-button
 | 
	
		
			
				|  |  |                  type="text"
 | 
	
		
			
				|  |  |                  size="small"
 | 
	
		
			
				|  |  | -                @click="rowCellDetailed(row,index)"
 | 
	
		
			
				|  |  | -              >{{row.$cellEdit?'保存':'修改'}}</el-button>
 | 
	
		
			
				|  |  | -              <el-button
 | 
	
		
			
				|  |  | -                type="text"
 | 
	
		
			
				|  |  | -                size="small"
 | 
	
		
			
				|  |  | -                @click="sendHandle"
 | 
	
		
			
				|  |  | -                v-if="!row.$cellEdit"
 | 
	
		
			
				|  |  | -              >发货</el-button>
 | 
	
		
			
				|  |  | +                @click="rowCell(row,index)"
 | 
	
		
			
				|  |  | +              >{{ row.$cellEdit ? '保存' : '修改' }}
 | 
	
		
			
				|  |  | +              </el-button>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |              <template slot="menuLeft" slot-scope="{size}">
 | 
	
		
			
				|  |  | -              <el-button type="warning"
 | 
	
		
			
				|  |  | -                         icon="el-icon-download"
 | 
	
		
			
				|  |  | -                         size="small"
 | 
	
		
			
				|  |  | -              >导 出</el-button>
 | 
	
		
			
				|  |  | -              <el-button type="info"
 | 
	
		
			
				|  |  | -                         icon="el-icon-printer"
 | 
	
		
			
				|  |  | +              <el-button type="primary"
 | 
	
		
			
				|  |  | +                         icon="el-icon-plus"
 | 
	
		
			
				|  |  |                           size="small"
 | 
	
		
			
				|  |  | -              >打 印</el-button>
 | 
	
		
			
				|  |  | +                         @click="commoditySelection"
 | 
	
		
			
				|  |  | +              >新增
 | 
	
		
			
				|  |  | +              </el-button>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </avue-crud>
 | 
	
		
			
				|  |  |          </basic-container>
 | 
	
	
		
			
				|  | @@ -118,6 +117,45 @@
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <el-dialog
 | 
	
		
			
				|  |  | +      title="导入商品"
 | 
	
		
			
				|  |  | +      append-to-body
 | 
	
		
			
				|  |  | +      class="el-dialogDeep"
 | 
	
		
			
				|  |  | +      :visible.sync="dialogVisible"
 | 
	
		
			
				|  |  | +      width="80%"
 | 
	
		
			
				|  |  | +      :close-on-click-modal="false"
 | 
	
		
			
				|  |  | +      :destroy-on-close="true"
 | 
	
		
			
				|  |  | +      :close-on-press-escape="false">
 | 
	
		
			
				|  |  | +      <el-row style="height: 0;">
 | 
	
		
			
				|  |  | +        <el-col :span="5">
 | 
	
		
			
				|  |  | +          <div>
 | 
	
		
			
				|  |  | +            <el-scrollbar>
 | 
	
		
			
				|  |  | +              <basic-container>
 | 
	
		
			
				|  |  | +                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
 | 
	
		
			
				|  |  | +              </basic-container>
 | 
	
		
			
				|  |  | +            </el-scrollbar>
 | 
	
		
			
				|  |  | +          </div>
 | 
	
		
			
				|  |  | +        </el-col>
 | 
	
		
			
				|  |  | +        <el-col :span="19">
 | 
	
		
			
				|  |  | +          <basic-container>
 | 
	
		
			
				|  |  | +            <avue-crud :option="optionTwo"
 | 
	
		
			
				|  |  | +                       :table-loading="loading"
 | 
	
		
			
				|  |  | +                       :data="data"
 | 
	
		
			
				|  |  | +                       ref="crud"
 | 
	
		
			
				|  |  | +                       @refresh-change="refreshChange"
 | 
	
		
			
				|  |  | +                       @selection-change="selectionChange"
 | 
	
		
			
				|  |  | +                       :page.sync="page"
 | 
	
		
			
				|  |  | +                       @on-load="onLoad"></avue-crud>
 | 
	
		
			
				|  |  | +          </basic-container>
 | 
	
		
			
				|  |  | +        </el-col>
 | 
	
		
			
				|  |  | +      </el-row>
 | 
	
		
			
				|  |  | +      <span slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  | +          <el-button @click="dialogVisible = false">取 消</el-button>
 | 
	
		
			
				|  |  | +          <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
 | 
	
		
			
				|  |  | +          <el-button type="primary" @click="importChoice" v-if="commodityData === true"
 | 
	
		
			
				|  |  | +                     :disabled="tableData.length !== 1">导入</el-button>
 | 
	
		
			
				|  |  | +        </span>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  | +    <el-dialog
 | 
	
		
			
				|  |  |        title="导入费用"
 | 
	
		
			
				|  |  |        append-to-body
 | 
	
		
			
				|  |  |        class="el-dialogDeep"
 | 
	
	
		
			
				|  | @@ -160,11 +198,24 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import detailedList from './config/detailedList.json'
 | 
	
		
			
				|  |  | +import customerContact from "./config/customerContact.json"
 | 
	
		
			
				|  |  |  import uploadList from './config/uploadList.json'
 | 
	
		
			
				|  |  |  import advantageProject from "./config/advantageProject.json"
 | 
	
		
			
				|  |  |  import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
 | 
	
		
			
				|  |  |  import optionTwoCost from "./config/mainListCost.json"
 | 
	
		
			
				|  |  | +import {detailListData,
 | 
	
		
			
				|  |  | +  submitData,} from "@/api/importTrade/purchase";
 | 
	
		
			
				|  |  | +import commodity from "./config/commodity.json"
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +  typeSave, detail, deleteDetails,
 | 
	
		
			
				|  |  | +  corpstypeTree,
 | 
	
		
			
				|  |  | +  corpsattn,
 | 
	
		
			
				|  |  | +  corpsbank,
 | 
	
		
			
				|  |  | +  corpsfiles,
 | 
	
		
			
				|  |  | +  corpsitem,
 | 
	
		
			
				|  |  | +  getList,
 | 
	
		
			
				|  |  | +  getDeptLazyTreeS
 | 
	
		
			
				|  |  | +} from "@/api/basicData/configuration"
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "detailsPage",
 | 
	
	
		
			
				|  | @@ -172,10 +223,46 @@ export default {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        form: {},
 | 
	
		
			
				|  |  |        disabled: false,
 | 
	
		
			
				|  |  | -      // 明细配置
 | 
	
		
			
				|  |  | -      detailedList: detailedList,
 | 
	
		
			
				|  |  | -      // 明细数据
 | 
	
		
			
				|  |  | -      detailedData: [],
 | 
	
		
			
				|  |  | +      customerContact: customerContact,
 | 
	
		
			
				|  |  | +      contactsForm: {},
 | 
	
		
			
				|  |  | +      contactsData: [],
 | 
	
		
			
				|  |  | +      dialogVisible:false,
 | 
	
		
			
				|  |  | +      commodityData: false,
 | 
	
		
			
				|  |  | +      tableData: [],
 | 
	
		
			
				|  |  | +      optionTwo: commodity,
 | 
	
		
			
				|  |  | +      loading: false,
 | 
	
		
			
				|  |  | +      data: [],
 | 
	
		
			
				|  |  | +      page: {
 | 
	
		
			
				|  |  | +        pageSize: 10,
 | 
	
		
			
				|  |  | +        currentPage: 1,
 | 
	
		
			
				|  |  | +        total: 0
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      treeDeptId: '',
 | 
	
		
			
				|  |  | +      treeOption: {
 | 
	
		
			
				|  |  | +        nodeKey: 'id',
 | 
	
		
			
				|  |  | +        lazy: true,
 | 
	
		
			
				|  |  | +        treeLoad: function (node, resolve) {
 | 
	
		
			
				|  |  | +          const parentId = (node.level === 0) ? 0 : node.data.id;
 | 
	
		
			
				|  |  | +          getDeptLazyTreeS(parentId).then(res => {
 | 
	
		
			
				|  |  | +            console.log(res.data.data)
 | 
	
		
			
				|  |  | +            resolve(res.data.data.map(item => {
 | 
	
		
			
				|  |  | +              return {
 | 
	
		
			
				|  |  | +                ...item,
 | 
	
		
			
				|  |  | +                leaf: !item.hasChildren
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            }))
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        addBtn: false,
 | 
	
		
			
				|  |  | +        menu: false,
 | 
	
		
			
				|  |  | +        size: 'small',
 | 
	
		
			
				|  |  | +        props: {
 | 
	
		
			
				|  |  | +          labelText: '标题',
 | 
	
		
			
				|  |  | +          label: 'title',
 | 
	
		
			
				|  |  | +          value: 'value',
 | 
	
		
			
				|  |  | +          children: 'children'
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |        // 合同上传数据
 | 
	
		
			
				|  |  |        uploadList: uploadList,
 | 
	
		
			
				|  |  |        // 合同数据
 | 
	
	
		
			
				|  | @@ -238,7 +325,29 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '到港日期',
 | 
	
		
			
				|  |  | -            prop: 'arrivalDate',
 | 
	
		
			
				|  |  | +            prop: 'dateOfArrival',
 | 
	
		
			
				|  |  | +            type:'datetime',
 | 
	
		
			
				|  |  | +            rules: [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  | +                message: ' ',
 | 
	
		
			
				|  |  | +                trigger: 'blur'
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            ]
 | 
	
		
			
				|  |  | +          },{
 | 
	
		
			
				|  |  | +            label: '要求发货日期',
 | 
	
		
			
				|  |  | +            prop: 'requiredDeliveryDate',
 | 
	
		
			
				|  |  | +            type:'datetime',
 | 
	
		
			
				|  |  | +            rules: [
 | 
	
		
			
				|  |  | +              {
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: ' ',
 | 
	
		
			
				|  |  | +                trigger: 'blur'
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            ]
 | 
	
		
			
				|  |  | +          }, {
 | 
	
		
			
				|  |  | +            label: '要求到货日期',
 | 
	
		
			
				|  |  | +            prop: 'requiredArrivalDate',
 | 
	
		
			
				|  |  |              type:'datetime',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
	
		
			
				|  | @@ -250,11 +359,11 @@ export default {
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '供应商',
 | 
	
		
			
				|  |  |              prop: 'corpId',
 | 
	
		
			
				|  |  | -            type:'select',
 | 
	
		
			
				|  |  | +            // type:'select',
 | 
	
		
			
				|  |  |              dicData: [],
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -262,11 +371,11 @@ export default {
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '业务员',
 | 
	
		
			
				|  |  |              prop: 'salesName',
 | 
	
		
			
				|  |  | -            type:'select',
 | 
	
		
			
				|  |  | +            // type:'select',
 | 
	
		
			
				|  |  |              dicData: [],
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -276,18 +385,18 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'orderNo',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '合同日期',
 | 
	
		
			
				|  |  | -            prop: 'businessDate',
 | 
	
		
			
				|  |  | +            prop: 'businesDate',
 | 
	
		
			
				|  |  |              type:'datetime',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -295,11 +404,11 @@ export default {
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '合同类型',
 | 
	
		
			
				|  |  |              prop: 'orderType',
 | 
	
		
			
				|  |  | -            type:'select',
 | 
	
		
			
				|  |  | +            // type:'select',
 | 
	
		
			
				|  |  |              dicData: [],
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -307,11 +416,11 @@ export default {
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '采购商',
 | 
	
		
			
				|  |  |              prop: 'purchaserId',
 | 
	
		
			
				|  |  | -            type:'select',
 | 
	
		
			
				|  |  | +            // type:'select',
 | 
	
		
			
				|  |  |              dicData: [],
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -319,11 +428,11 @@ export default {
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '付款方式',
 | 
	
		
			
				|  |  |              prop: 'paymentType',
 | 
	
		
			
				|  |  | -            type:'select',
 | 
	
		
			
				|  |  | +            // type:'select',
 | 
	
		
			
				|  |  |              dicData: [],
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -334,7 +443,7 @@ export default {
 | 
	
		
			
				|  |  |              type:'datetime',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -345,7 +454,7 @@ export default {
 | 
	
		
			
				|  |  |              type:'datetime',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -355,7 +464,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'orderAmount',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -365,7 +474,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'rmbAmount',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -375,7 +484,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'advancePayment',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -385,7 +494,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'salesPrice',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -395,7 +504,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'currency',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -405,7 +514,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'exchangeRate',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -415,7 +524,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'contractWeight',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -425,7 +534,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'billWeight',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -435,7 +544,7 @@ export default {
 | 
	
		
			
				|  |  |              prop: 'settlmentAmount',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | +                required: false,
 | 
	
		
			
				|  |  |                  message: ' ',
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
	
		
			
				|  | @@ -454,6 +563,13 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  |      if (this.$route.query.id) {
 | 
	
		
			
				|  |  | +      let id = this.$route.query.id.replace(/\"/g, "")
 | 
	
		
			
				|  |  | +      detailListData(id).then(res => {
 | 
	
		
			
				|  |  | +        this.form = res.data.data;
 | 
	
		
			
				|  |  | +        this.detailedData = res.data.data.itemsVOList
 | 
	
		
			
				|  |  | +        this.advantageProjectData = res.data.data.orderFeesList
 | 
	
		
			
				|  |  | +        this.bankOfDepositData = res.data.data.orderFilesList
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
	
		
			
				|  | @@ -461,15 +577,128 @@ export default {
 | 
	
		
			
				|  |  |      editCustomer() {
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid) => {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  | +          let submitDto = {
 | 
	
		
			
				|  |  | +            itemsVOList: [],
 | 
	
		
			
				|  |  | +            orderFeesList: [],
 | 
	
		
			
				|  |  | +            orderFilesList: []
 | 
	
		
			
				|  |  | +          };
 | 
	
		
			
				|  |  | +          submitDto = Object.assign({}, submitDto, this.form)
 | 
	
		
			
				|  |  | +          submitDto.itemsVOList = this.contactsData
 | 
	
		
			
				|  |  | +          submitDto.orderFeesList = this.advantageProjectData
 | 
	
		
			
				|  |  | +          submitDto.orderFilesList = this.bankOfDepositData
 | 
	
		
			
				|  |  | +          submitData(submitDto).then(res => {})
 | 
	
		
			
				|  |  |            this.backToList()
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |            return false;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    // 采购明细编辑
 | 
	
		
			
				|  |  | -    rowCellDetailed(row, index) {
 | 
	
		
			
				|  |  | -      this.$refs.detailedList.rowCell(row, index)
 | 
	
		
			
				|  |  | +    //新增商品明细保存触发
 | 
	
		
			
				|  |  | +    rowSave(row, done, loading) {
 | 
	
		
			
				|  |  | +      // this.contactsData.push(row)
 | 
	
		
			
				|  |  | +      done()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //修改商品信息触发
 | 
	
		
			
				|  |  | +    rowUpdate(row, index, done, loading) {
 | 
	
		
			
				|  |  | +      done(row);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //删除商品信息触发
 | 
	
		
			
				|  |  | +    rowDel(row, index, donerowDel) {
 | 
	
		
			
				|  |  | +      this.$confirm("确定将选择数据删除?", {
 | 
	
		
			
				|  |  | +        confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        type: "warning"
 | 
	
		
			
				|  |  | +      }).then(() => {
 | 
	
		
			
				|  |  | +        //商品判断是否需要调用删除接口
 | 
	
		
			
				|  |  | +        if (row.id) {
 | 
	
		
			
				|  |  | +          corpsattn(row.id).then(res => {
 | 
	
		
			
				|  |  | +            this.$message({
 | 
	
		
			
				|  |  | +              type: "success",
 | 
	
		
			
				|  |  | +              message: "操作成功!"
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            this.contactsData.splice(index, 1);
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          this.$message({
 | 
	
		
			
				|  |  | +            type: "success",
 | 
	
		
			
				|  |  | +            message: "操作成功!"
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          this.contactsData.splice(index, 1);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //点击商品明细选择触发
 | 
	
		
			
				|  |  | +    commodityChoice(row) {
 | 
	
		
			
				|  |  | +      this.dialogVisible = !this.dialogVisible
 | 
	
		
			
				|  |  | +      this.commodityData = true
 | 
	
		
			
				|  |  | +      this.choiceIndexT = row.$index
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //商品编辑
 | 
	
		
			
				|  |  | +    rowCell(row, index) {
 | 
	
		
			
				|  |  | +      this.$refs.crudContact.rowCell(row, index)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //商品新增触发
 | 
	
		
			
				|  |  | +    commoditySelection() {
 | 
	
		
			
				|  |  | +      this.dialogVisible = !this.dialogVisible
 | 
	
		
			
				|  |  | +      this.commodityData = false
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //点击行可编辑
 | 
	
		
			
				|  |  | +    handleRowClick(row, event, column) {
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //刷新触发
 | 
	
		
			
				|  |  | +    refreshChange() {
 | 
	
		
			
				|  |  | +      this.treeDeptId = '';
 | 
	
		
			
				|  |  | +      this.page.currentPage = 1;
 | 
	
		
			
				|  |  | +      this.onLoad(this.page);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //选中触发
 | 
	
		
			
				|  |  | +    selectionChange(list) {
 | 
	
		
			
				|  |  | +      this.tableData = list
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //导入页左商品类型查询
 | 
	
		
			
				|  |  | +    nodeClick(data) {
 | 
	
		
			
				|  |  | +      this.treeDeptId = data.id;
 | 
	
		
			
				|  |  | +      this.page.currentPage = 1;
 | 
	
		
			
				|  |  | +      this.onLoad(this.page);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onLoad(page, params = {}) {
 | 
	
		
			
				|  |  | +      this.loading = true;
 | 
	
		
			
				|  |  | +      getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
 | 
	
		
			
				|  |  | +        console.log(res)
 | 
	
		
			
				|  |  | +        const data = res.data.data;
 | 
	
		
			
				|  |  | +        this.page.total = data.total;
 | 
	
		
			
				|  |  | +        this.data = data.records;
 | 
	
		
			
				|  |  | +        this.loading = false;
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //确认导入触发
 | 
	
		
			
				|  |  | +    importGoods() {
 | 
	
		
			
				|  |  | +      // this.contactsData = this.contactsData.concat(this.tableData)
 | 
	
		
			
				|  |  | +      if (this.tableData.length > 0) {
 | 
	
		
			
				|  |  | +        for (let item in this.tableData) {
 | 
	
		
			
				|  |  | +          console.log(this.tableData[item])
 | 
	
		
			
				|  |  | +          this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
 | 
	
		
			
				|  |  | +          this.tableData[item].itemId = this.tableData[item].id
 | 
	
		
			
				|  |  | +          delete this.tableData[item].id
 | 
	
		
			
				|  |  | +          this.$refs.crudContact.rowCellAdd(this.tableData[item]);
 | 
	
		
			
				|  |  | +          this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.tableData = []
 | 
	
		
			
				|  |  | +      this.dialogVisible = false
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //导入商品触发
 | 
	
		
			
				|  |  | +    importChoice() {
 | 
	
		
			
				|  |  | +      if (this.tableData.length === 1) {
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].code = this.tableData[0].code
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.dialogVisible = !this.dialogVisible
 | 
	
		
			
				|  |  | +      this.commodityData = false
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //其他费用编辑
 | 
	
		
			
				|  |  |      rowCellTwo(row, index) {
 |