|  | @@ -2,6 +2,7 @@
 | 
	
		
			
				|  |  |    <div class="borderless">
 | 
	
		
			
				|  |  |      <div class="customer-head">
 | 
	
		
			
				|  |  |        <div class="customer-back">
 | 
	
		
			
				|  |  | +        <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
 | 
	
		
			
				|  |  |          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
 | 
	
		
			
				|  |  |                     @click="backToList">返回列表
 | 
	
		
			
				|  |  |          </el-button>
 | 
	
	
		
			
				|  | @@ -14,7 +15,8 @@
 | 
	
		
			
				|  |  |        <el-button
 | 
	
		
			
				|  |  |            class="el-button--small-yh add-customer-btn"
 | 
	
		
			
				|  |  |            type="primary"
 | 
	
		
			
				|  |  | -          @click="editCustomer"
 | 
	
		
			
				|  |  | +          :disabled="disabled"
 | 
	
		
			
				|  |  | +          @click="editCustomer(false)"
 | 
	
		
			
				|  |  |        >{{ form.id ? '确认修改' : '确认新增' }}
 | 
	
		
			
				|  |  |        </el-button>
 | 
	
		
			
				|  |  |      </div>
 | 
	
	
		
			
				|  | @@ -29,10 +31,11 @@
 | 
	
		
			
				|  |  |                                  size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
 | 
	
		
			
				|  |  |                  <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
 | 
	
		
			
				|  |  |                                   :configuration="configuration"/>
 | 
	
		
			
				|  |  | -                <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable size="small" style="width: 100%">
 | 
	
		
			
				|  |  | +                <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
 | 
	
		
			
				|  |  |                    <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
 | 
	
		
			
				|  |  |                  </el-select>
 | 
	
		
			
				|  |  | -                <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
 | 
	
		
			
				|  |  | +                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
 | 
	
		
			
				|  |  | +                <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
		
			
				|  |  |            </el-row>
 | 
	
	
		
			
				|  | @@ -42,9 +45,13 @@
 | 
	
		
			
				|  |  |            <el-row>
 | 
	
		
			
				|  |  |              <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
 | 
	
		
			
				|  |  |                <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
 | 
	
		
			
				|  |  | -                <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
 | 
	
		
			
				|  |  | +                <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disabled"/>
 | 
	
		
			
				|  |  |                  <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="configuration"/>
 | 
	
		
			
				|  |  |                  <el-input v-else-if="(item.prop === 'advancePayment') || (item.prop === 'settlmentAmount')" v-model="form[item.prop]" size="small" autocomplete="off" @change="computedCost"></el-input>
 | 
	
		
			
				|  |  | +                <el-select v-else-if="item.prop === 'orderStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
 | 
	
		
			
				|  |  | +                  <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
 | 
	
		
			
				|  |  | +                </el-select>
 | 
	
		
			
				|  |  | +                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
 | 
	
		
			
				|  |  |                  <el-input v-else type="age" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
 | 
	
		
			
				|  |  |                </el-form-item>
 | 
	
		
			
				|  |  |              </el-col>
 | 
	
	
		
			
				|  | @@ -71,9 +78,8 @@
 | 
	
		
			
				|  |  |                <el-input
 | 
	
		
			
				|  |  |                  v-if="row.$cellEdit"
 | 
	
		
			
				|  |  |                  v-model="row.orderQuantity"
 | 
	
		
			
				|  |  | -                size="small"
 | 
	
		
			
				|  |  | -                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
 | 
	
		
			
				|  |  | -                @change="quantityChange(row)"
 | 
	
		
			
				|  |  | +                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'                size="small"
 | 
	
		
			
				|  |  | +                @input="quantityChange(row)"
 | 
	
		
			
				|  |  |                ></el-input>
 | 
	
		
			
				|  |  |                <span v-else>{{ row.orderQuantity }}</span>
 | 
	
		
			
				|  |  |              </template>
 | 
	
	
		
			
				|  | @@ -82,8 +88,7 @@
 | 
	
		
			
				|  |  |                  v-if="row.$cellEdit"
 | 
	
		
			
				|  |  |                  v-model="row.price"
 | 
	
		
			
				|  |  |                  size="small"
 | 
	
		
			
				|  |  | -                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
 | 
	
		
			
				|  |  | -                @change="priceChange(row)"
 | 
	
		
			
				|  |  | +                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'                @input="priceChange(row)"
 | 
	
		
			
				|  |  |                ></el-input>
 | 
	
		
			
				|  |  |                <span v-else>{{ row.price }}</span>
 | 
	
		
			
				|  |  |              </template>
 | 
	
	
		
			
				|  | @@ -112,6 +117,7 @@
 | 
	
		
			
				|  |  |                           :disabled="selection.length < 1"
 | 
	
		
			
				|  |  |                           @click="generateShipmentD">生成发货单
 | 
	
		
			
				|  |  |                </el-button>
 | 
	
		
			
				|  |  | +              <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </avue-crud>
 | 
	
		
			
				|  |  |          </basic-container>
 | 
	
	
		
			
				|  | @@ -130,6 +136,13 @@
 | 
	
		
			
				|  |  |                <span style="float: left;padding-top: 2px">{{ row.code }}</span>
 | 
	
		
			
				|  |  |                <el-button type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  | +            <template slot="corpId" slot-scope="{ row }">
 | 
	
		
			
				|  |  | +              <selectComponent v-if="row.$cellEdit" v-model="row.corpId"
 | 
	
		
			
				|  |  | +                               :configuration="configuration" @receiveList="receiveList"/>
 | 
	
		
			
				|  |  | +              <span v-else>
 | 
	
		
			
				|  |  | +                <span v-for="item in corpNameOption" v-if="item.id == row.corpId">{{ item.cname }}</span>
 | 
	
		
			
				|  |  | +              </span>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  |              <template slot-scope="{row,index}" slot="menu">
 | 
	
		
			
				|  |  |                <el-button
 | 
	
		
			
				|  |  |                    type="text"
 | 
	
	
		
			
				|  | @@ -176,7 +189,7 @@
 | 
	
		
			
				|  |  |            <div>
 | 
	
		
			
				|  |  |              <el-scrollbar>
 | 
	
		
			
				|  |  |                <basic-container>
 | 
	
		
			
				|  |  | -                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
 | 
	
		
			
				|  |  | +                <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick"/>
 | 
	
		
			
				|  |  |                </basic-container>
 | 
	
		
			
				|  |  |              </el-scrollbar>
 | 
	
		
			
				|  |  |            </div>
 | 
	
	
		
			
				|  | @@ -454,13 +467,12 @@ import {
 | 
	
		
			
				|  |  |    policyColumn
 | 
	
		
			
				|  |  |  } from "@/api/basicData/basicFeesDesc";
 | 
	
		
			
				|  |  |  import _ from "lodash";
 | 
	
		
			
				|  |  | -//业务字典
 | 
	
		
			
				|  |  | -import { getDictionary } from "@/api/system/dictbiz";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "detailsPage",
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      disabled: false,
 | 
	
		
			
				|  |  |        form: {},
 | 
	
		
			
				|  |  |        configuration: {
 | 
	
		
			
				|  |  |          multipleChoices: false,
 | 
	
	
		
			
				|  | @@ -478,6 +490,7 @@ export default {
 | 
	
		
			
				|  |  |        commodityData: false,
 | 
	
		
			
				|  |  |        dataCost: [],
 | 
	
		
			
				|  |  |        treeDataPolicy: [],
 | 
	
		
			
				|  |  | +      treeDataGoods: [],
 | 
	
		
			
				|  |  |        choiceIndex: '',
 | 
	
		
			
				|  |  |        dialogCost: false,
 | 
	
		
			
				|  |  |        treeDeptId: '',
 | 
	
	
		
			
				|  | @@ -615,9 +628,9 @@ export default {
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  | -          }, {
 | 
	
		
			
				|  |  | -            label: '应收账款',
 | 
	
		
			
				|  |  | -            prop: 'debitAmount',
 | 
	
		
			
				|  |  | +          },  {
 | 
	
		
			
				|  |  | +            label: '溢付款',
 | 
	
		
			
				|  |  | +            prop: 'overPayment',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -625,9 +638,9 @@ export default {
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  | -          }, {
 | 
	
		
			
				|  |  | -            label: '单据状态',
 | 
	
		
			
				|  |  | -            prop: 'status',
 | 
	
		
			
				|  |  | +          },{
 | 
	
		
			
				|  |  | +            label: '应收账款',
 | 
	
		
			
				|  |  | +            prop: 'debitAmount',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -636,8 +649,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '溢付款',
 | 
	
		
			
				|  |  | -            prop: 'overPayment',
 | 
	
		
			
				|  |  | +            label: '已收款',
 | 
	
		
			
				|  |  | +            prop: 'settlmentAmount',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -646,8 +659,9 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '应收预付款',
 | 
	
		
			
				|  |  | -            prop: 'advancePayment',
 | 
	
		
			
				|  |  | +            label: '应收未收款',
 | 
	
		
			
				|  |  | +            prop: 'accountsReceivable',//无
 | 
	
		
			
				|  |  | +            disabled: true,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -656,8 +670,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '已收款',
 | 
	
		
			
				|  |  | -            prop: 'settlmentAmount',
 | 
	
		
			
				|  |  | +            label: '应收预付款',
 | 
	
		
			
				|  |  | +            prop: 'advancePayment',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -666,9 +680,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '应收未收款',
 | 
	
		
			
				|  |  | -            prop: 'accountsReceivable',//无
 | 
	
		
			
				|  |  | -            disabled: true,
 | 
	
		
			
				|  |  | +            label: '保证金',
 | 
	
		
			
				|  |  | +            prop: 'deposit',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -677,8 +690,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '保证金',
 | 
	
		
			
				|  |  | -            prop: 'deposit',
 | 
	
		
			
				|  |  | +            label: '逾期账款',
 | 
	
		
			
				|  |  | +            prop: 'overDueAccounts',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -687,8 +700,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '逾期账款',
 | 
	
		
			
				|  |  | -            prop: 'overDueAccounts',
 | 
	
		
			
				|  |  | +            label: '所属公司',
 | 
	
		
			
				|  |  | +            prop: 'belongToCorpId',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -718,10 +731,9 @@ export default {
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  | -          }, {
 | 
	
		
			
				|  |  | -            label: '制单日期',
 | 
	
		
			
				|  |  | -            prop: 'createTime',
 | 
	
		
			
				|  |  | -            type: 'datetime',
 | 
	
		
			
				|  |  | +          },  {
 | 
	
		
			
				|  |  | +            label: '毛利率',
 | 
	
		
			
				|  |  | +            prop: 'grossProfitRate',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -730,8 +742,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '制单人',
 | 
	
		
			
				|  |  | -            prop: 'createUserName',
 | 
	
		
			
				|  |  | +            label: '毛利额',
 | 
	
		
			
				|  |  | +            prop: 'grossProfit',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -740,8 +752,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '毛利率',
 | 
	
		
			
				|  |  | -            prop: 'grossProfitRate',
 | 
	
		
			
				|  |  | +            label: '历史运费(元/条)',
 | 
	
		
			
				|  |  | +            prop: 'freightAmountHistory',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -750,8 +762,9 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '毛利额',
 | 
	
		
			
				|  |  | -            prop: 'grossProfit',
 | 
	
		
			
				|  |  | +            label: '到货日期',
 | 
	
		
			
				|  |  | +            prop: 'arrivalDate',
 | 
	
		
			
				|  |  | +            type: 'datetime',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -760,8 +773,9 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '所属公司',
 | 
	
		
			
				|  |  | -            prop: 'belongToCorpId',
 | 
	
		
			
				|  |  | +            label: '预收款日期',
 | 
	
		
			
				|  |  | +            type: 'datetime',
 | 
	
		
			
				|  |  | +            prop: 'advanceCollectionDate',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -770,8 +784,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '历史运费(元/条)',
 | 
	
		
			
				|  |  | -            prop: 'freightAmountHistory',
 | 
	
		
			
				|  |  | +            label: '积分倍数',
 | 
	
		
			
				|  |  | +            prop: 'pointMutiple',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -780,9 +794,8 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '到货日期',
 | 
	
		
			
				|  |  | -            prop: 'arrivalDate',
 | 
	
		
			
				|  |  | -            type: 'datetime',
 | 
	
		
			
				|  |  | +            label: '单据状态',
 | 
	
		
			
				|  |  | +            prop: 'orderStatus',
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -790,10 +803,11 @@ export default {
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  | -          }, {
 | 
	
		
			
				|  |  | -            label: '预收款日期',
 | 
	
		
			
				|  |  | +          },{
 | 
	
		
			
				|  |  | +            label: '制单日期',
 | 
	
		
			
				|  |  | +            prop: 'createTime',
 | 
	
		
			
				|  |  |              type: 'datetime',
 | 
	
		
			
				|  |  | -            prop: 'advanceCollectionDate',
 | 
	
		
			
				|  |  | +            disabled:true,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -802,8 +816,10 @@ export default {
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  | -            label: '积分倍数',
 | 
	
		
			
				|  |  | -            prop: 'pointMutiple',
 | 
	
		
			
				|  |  | +            label: '制单人',
 | 
	
		
			
				|  |  | +            prop: 'createUserName',
 | 
	
		
			
				|  |  | +            disabled: true,
 | 
	
		
			
				|  |  | +            span: 24,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -811,9 +827,11 @@ export default {
 | 
	
		
			
				|  |  |                  trigger: 'blur'
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  | -          }, {
 | 
	
		
			
				|  |  | +          },{
 | 
	
		
			
				|  |  |              label: '特别提醒',
 | 
	
		
			
				|  |  |              prop: 'specialRemarks',
 | 
	
		
			
				|  |  | +            type: 'textarea',
 | 
	
		
			
				|  |  | +            span: 24,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: false,
 | 
	
	
		
			
				|  | @@ -950,6 +968,7 @@ export default {
 | 
	
		
			
				|  |  |              ]
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: "订单备注",
 | 
	
		
			
				|  |  | +            type: 'textarea',
 | 
	
		
			
				|  |  |              span: 24,
 | 
	
		
			
				|  |  |              prop: "orderRemark",
 | 
	
		
			
				|  |  |              mock: {
 | 
	
	
		
			
				|  | @@ -959,10 +978,19 @@ export default {
 | 
	
		
			
				|  |  |          ]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        paymentOption: [],
 | 
	
		
			
				|  |  | +      statusOption: [],
 | 
	
		
			
				|  |  | +      corpNameOption: [],
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    //初始化查询
 | 
	
		
			
				|  |  |    created() {
 | 
	
		
			
				|  |  | +    this.getWorkDicts("payment_term").then(res => {
 | 
	
		
			
				|  |  | +      this.paymentOption = res.data.data
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    this.getWorkDicts("order_status").then(res => {
 | 
	
		
			
				|  |  | +      this.statusOption = res.data.data
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    this.$set(this.form, 'orderStatus', '录入')
 | 
	
		
			
				|  |  |      if (this.$route.query.id) {
 | 
	
		
			
				|  |  |        let id = this.$route.query.id.replace(/\"/g, "")
 | 
	
		
			
				|  |  |        this.queryData(id)
 | 
	
	
		
			
				|  | @@ -971,12 +999,6 @@ export default {
 | 
	
		
			
				|  |  |        let id = this.$route.query.copyId.replace(/\"/g, "")
 | 
	
		
			
				|  |  |        this.queryData(id, true)
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    const params = {
 | 
	
		
			
				|  |  | -      code : "affair_payment_term"
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    getDictionary(params).then(res => {
 | 
	
		
			
				|  |  | -      this.paymentOption = res.data.data
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    watch: {
 | 
	
		
			
				|  |  |      '$route'(to, from) {
 | 
	
	
		
			
				|  | @@ -1001,8 +1023,20 @@ export default {
 | 
	
		
			
				|  |  |          this.advantageProjectData = this.form.orderFeesList
 | 
	
		
			
				|  |  |          this.bankOfDepositData = this.form.orderFilesList
 | 
	
		
			
				|  |  |          this.configuration.dicData = this.form.corpName
 | 
	
		
			
				|  |  | -        this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
 | 
	
		
			
				|  |  | -        // delete this.form.orderItemsList
 | 
	
		
			
				|  |  | +        if (this.form.belongToCorpList) {
 | 
	
		
			
				|  |  | +          this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        let feesData = []
 | 
	
		
			
				|  |  | +        this.form.orderFeesList.forEach(item => {
 | 
	
		
			
				|  |  | +          let a = {
 | 
	
		
			
				|  |  | +            cname: item.corpName,
 | 
	
		
			
				|  |  | +            id: item.corpId
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          feesData.push(a)
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        this.configuration.dicData = this.configuration.dicData.concat(feesData)
 | 
	
		
			
				|  |  | +        this.corpNameOption = this.configuration.dicData
 | 
	
		
			
				|  |  | +        delete this.form.orderItemsList
 | 
	
		
			
				|  |  |          delete this.form.orderFeesList
 | 
	
		
			
				|  |  |          delete this.form.orderFilesList
 | 
	
		
			
				|  |  |          delete this.form.corpName
 | 
	
	
		
			
				|  | @@ -1099,6 +1133,11 @@ export default {
 | 
	
		
			
				|  |  |        console.log(row)
 | 
	
		
			
				|  |  |        this.choiceIndex = row.$index
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    //
 | 
	
		
			
				|  |  | +    receiveList(data){
 | 
	
		
			
				|  |  | +      console.log(data)
 | 
	
		
			
				|  |  | +      this.corpNameOption = this.corpNameOption.concat(data)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      //点击商品明细选择触发
 | 
	
		
			
				|  |  |      commodityChoice(row) {
 | 
	
		
			
				|  |  |        this.dialogVisible = !this.dialogVisible
 | 
	
	
		
			
				|  | @@ -1116,6 +1155,9 @@ export default {
 | 
	
		
			
				|  |  |          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.contactsData[this.choiceIndexT].orderQuantity = 0
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].price = 0
 | 
	
		
			
				|  |  | +        this.contactsData[this.choiceIndexT].amount = 0
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.dialogVisible = !this.dialogVisible
 | 
	
		
			
				|  |  |        this.commodityData = false
 | 
	
	
		
			
				|  | @@ -1155,6 +1197,10 @@ export default {
 | 
	
		
			
				|  |  |            this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
 | 
	
		
			
				|  |  |            delete this.tableData[item].goodsTypeName
 | 
	
		
			
				|  |  |            this.tableData[item].itemId = this.tableData[item].id
 | 
	
		
			
				|  |  | +          // this.tableData[item].orderQuantity = 0
 | 
	
		
			
				|  |  | +          this.$set(this.tableData[item], 'orderQuantity', 0)
 | 
	
		
			
				|  |  | +          this.tableData[item].price = 0
 | 
	
		
			
				|  |  | +          this.tableData[item].amount = 0
 | 
	
		
			
				|  |  |            delete this.tableData[item].id
 | 
	
		
			
				|  |  |            this.$refs.crudContact.rowCellAdd(this.tableData[item]);
 | 
	
		
			
				|  |  |            this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
 | 
	
	
		
			
				|  | @@ -1164,7 +1210,7 @@ export default {
 | 
	
		
			
				|  |  |        this.dialogVisible = false
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      closeGoods() {
 | 
	
		
			
				|  |  | -      this.tableData = [];
 | 
	
		
			
				|  |  | +      this.treeDataGoods = [];
 | 
	
		
			
				|  |  |        this.treeDeptId = "";
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      closeFees() {
 | 
	
	
		
			
				|  | @@ -1378,7 +1424,7 @@ export default {
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //修改提交触发
 | 
	
		
			
				|  |  | -    editCustomer() {
 | 
	
		
			
				|  |  | +    editCustomer(isBack = false) {
 | 
	
		
			
				|  |  |        console.log(this.form)
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid) => {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
	
		
			
				|  | @@ -1390,11 +1436,20 @@ export default {
 | 
	
		
			
				|  |  |              this.form.corpsTypeId = this.form.corpsTypeId.join(",")
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            this.form.billType = 'XS'
 | 
	
		
			
				|  |  | +          this.disabled = true
 | 
	
		
			
				|  |  |            typeSave(this.form).then(res => {
 | 
	
		
			
				|  |  |              this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
 | 
	
		
			
				|  |  | -            this.queryData(res.data.data.id)
 | 
	
		
			
				|  |  | -            //成功关闭此页面回到列表页
 | 
	
		
			
				|  |  | -            // this.backToList()
 | 
	
		
			
				|  |  | +            this.disabled = false
 | 
	
		
			
				|  |  | +            if (isBack) {
 | 
	
		
			
				|  |  | +              //成功关闭此页面回到列表页
 | 
	
		
			
				|  |  | +              this.$router.$avueRouter.closeTag();
 | 
	
		
			
				|  |  | +              this.$router.push({
 | 
	
		
			
				|  |  | +                path: '/businessManagement/salesOrder/index',
 | 
	
		
			
				|  |  | +                query: {}
 | 
	
		
			
				|  |  | +              });
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +              this.queryData(res.data.data.id)
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |            return false;
 | 
	
	
		
			
				|  | @@ -1416,30 +1471,35 @@ export default {
 | 
	
		
			
				|  |  |        this.$set(this.form, "accountsReceivable", Number(advancePayment) - Number(settlmentAmount)).toFixed(2);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      quantityChange(row) {
 | 
	
		
			
				|  |  | -      console.log(row)
 | 
	
		
			
				|  |  |        if (!row.orderQuantity) {
 | 
	
		
			
				|  |  |          row.orderQuantity = 0;
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          // row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
 | 
	
		
			
				|  |  | -        this.$set(row,"amount",_.multiply(row.price, row.orderQuantity).toFixed(2))
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        row.amount = (row.price * row.orderQuantity).toFixed(2)
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      priceChange(row) {
 | 
	
		
			
				|  |  |        if (!row.price) {
 | 
	
		
			
				|  |  |          row.price = 0;
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  | -        // row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
 | 
	
		
			
				|  |  | -        this.$set(row,"amount",_.multiply(row.price, row.orderQuantity).toFixed(2))
 | 
	
		
			
				|  |  | +        row.amount = (row.price * row.orderQuantity).toFixed(2)
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //返回列表
 | 
	
		
			
				|  |  |      backToList() {
 | 
	
		
			
				|  |  | -      this.$router.$avueRouter.closeTag();
 | 
	
		
			
				|  |  | -      this.$router.push({
 | 
	
		
			
				|  |  | -        path: '/businessManagement/salesOrder/index',
 | 
	
		
			
				|  |  | -        query: {}
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +      this.$confirm("是否保存当前页面?", "提示", {
 | 
	
		
			
				|  |  | +        confirmButtonText: "保存",
 | 
	
		
			
				|  |  | +        cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        type: "warning",
 | 
	
		
			
				|  |  | +      }).then(() => {
 | 
	
		
			
				|  |  | +        this.editCustomer(true)
 | 
	
		
			
				|  |  | +      }).catch(() => {
 | 
	
		
			
				|  |  | +        this.$router.$avueRouter.closeTag();
 | 
	
		
			
				|  |  | +        this.$router.push({
 | 
	
		
			
				|  |  | +          path: '/businessManagement/salesOrder/index',
 | 
	
		
			
				|  |  | +          query: {}
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 |