You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2360 lines
85 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="jnpf-wrap jnpf-wrap-form" v-if="!loading">
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
label-align="left" :label-width="labelwidth" class="jnpf-form">
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>合同类型
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractType')" :required="requiredList.contractType" label="合同类型"
left-icon="question-circle-fill"
@clickIcon="clickIcon('合同类型','不同的合同类型可编辑的字段内容不同,合同类型一旦保存不可修改,请选择更匹配你需求的一个。')"
:left-icon-style="{'color':'#a0acb7'}" prop="contractType">
<jnpf-radio v-model="dataForm.contractType" :disabled="judgeWrite('contractType')"
@change="changeData('contractType',-1)" optionType="button" direction="horizontal"
:props="contractTypeProps" :options="contractTypeOptions" :showOnly="true">
</jnpf-radio>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>基本信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractTemplateId')" :required="requiredList.contractTemplateId"
label="合同模板" prop="contractTemplateId">
<jnpf-popup-select v-model="dataForm.contractTemplateId"
:disabled="judgeWrite('contractTemplateId')" @change="changeData('contractTemplateId',-1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.contractTemplateId" clearable
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
vModel='contractTemplateId' :columnOptions="contractTemplateIdColumnOptions"
interfaceId="528856731099332613" :pageSize="20" placeholder="请选择" type="popup"
:style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractNumber')" :required="requiredList.contractNumber" label="合同编号"
prop="contractNumber">
<u-input v-model="dataForm.contractNumber" disabled @change="changeData('contractNumber',-1)"
input-align='right' placeholder="系统自动生成" :style='{"width":"100%"}' readonly>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractName')" :required="requiredList.contractName" label="合同名称"
prop="contractName">
<u-input v-model="dataForm.contractName" :disabled="judgeWrite('contractName')"
@change="changeData('contractName',-1)" input-align='right' clearable placeholder="请输入"
:style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractNo')" :required="requiredList.contractNo" label="对方合同编号"
prop="contractNo">
<u-input v-model="dataForm.contractNo" :disabled="judgeWrite('contractNo')"
@change="changeData('contractNo',-1)" input-align='right' clearable placeholder="请输入"
:style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractSignedTime')" :required="requiredList.contractSignedTime"
label="签订日期" prop="contractSignedTime">
<jnpf-date-time v-model="dataForm.contractSignedTime" :disabled="judgeWrite('contractSignedTime')"
@change="changeData('contractSignedTime',-1)" :startTime="dateTime(false,1,1,'','')"
:endTime="dateTime(false,1,1,'','')" format="yyyy-MM-dd" clearable placeholder="请选择" type="date"
:style='{"width":"100%"}'>
</jnpf-date-time>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('businessId')" :required="requiredList.businessId" label="关联业务线"
prop="businessId">
<jnpf-popup-select v-model="dataForm.businessId" :disabled="judgeWrite('businessId')"
@change="changeData('businessId',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.businessId" clearable propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' vModel='businessId'
:columnOptions="businessIdColumnOptions" interfaceId="517979330417001669" :pageSize="20"
placeholder="请选择" type="popup" :style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractPeriodTime')" :required="requiredList.contractPeriodTime"
label="有效期开始 " prop="contractPeriodTime">
<jnpf-date-time v-model="dataForm.contractPeriodTime" :disabled="judgeWrite('contractPeriodTime')"
@change="changeData('contractPeriodTime',-1)" :startTime="dateTime(false,1,1,'','')"
:endTime="dateTime(false,1,1,'','')" format="yyyy-MM-dd" clearable placeholder="请选择" type="date"
:style='{"width":"100%"}'>
</jnpf-date-time>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractPeriodTimeEnd')" :required="requiredList.contractPeriodTimeEnd"
label="有效期结束 " prop="contractPeriodTimeEnd">
<jnpf-date-time v-model="dataForm.contractPeriodTimeEnd"
:disabled="judgeWrite('contractPeriodTimeEnd')" @change="changeData('contractPeriodTimeEnd',-1)"
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')" format="yyyy-MM-dd"
clearable placeholder="请选择" type="date" :style='{"width":"100%"}'>
</jnpf-date-time>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>主体信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('deptId')" :required="requiredList.deptId" label="签约主体" prop="deptId">
<jnpf-com-select v-model="dataForm.deptId" :disabled="judgeWrite('deptId')"
@change="changeData('deptId',-1)" selectType="all" :ableIds="ableAll.deptIdableIds" clearable
placeholder="请选择" type="organize" :style='{"width":"100%"}'>
</jnpf-com-select>
<!-- <jnpf-com-select v-model="dataForm.deptId" :disabled="judgeWrite('deptId')"
@change="changeData('deptId',-1)" selectType="all" :ableIds="ableAll.deptIdableIds" clearable
placeholder="请选择" type="organize" :style='{"width":"100%"}'>
</jnpf-com-select> -->
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('subject')" :required="requiredList.subject" :label="fncGetSubjectLabel"
prop="subject">
<jnpf-popup-select v-model="dataForm.subject" :disabled="judgeWrite('subject')"
@change="changeData('subject',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="fncGetSubjectParamList" clearable propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='subject_name' vModel='subject'
:columnOptions="subjectColumnOptionsA" :interfaceId="fncGetSubjectInterfaceId" :pageSize="20"
placeholder="请选择" type="popup" :style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>财务信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>合同信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('procurementModel')" :required="requiredList.procurementModel" label="采购模式"
prop="procurementModel">
<jnpf-select v-model="dataForm.procurementModel" :disabled="judgeWrite('procurementModel')"
@change="changeData('procurementModel',-1)" clearable placeholder="请选择"
:props="procurementModelProps" :options="procurementModelOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<template v-if="dataForm.procurementModel == 1">
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('relatedContractId')" :required="requiredList.relatedContractId"
label="关联销售合同" prop="relatedContractId">
<jnpf-popup-select v-model="dataForm.relatedContractId" :disabled="judgeWrite('relatedContractId')"
@change="changeData('relatedContractId',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.relatedContractId" clearable propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='contract_name' vModel='relatedContractId'
:columnOptions="relatedContractIdColumnOptions" interfaceId="529270998021701701" :pageSize="20"
placeholder="请选择" type="popup" :style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
</template>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('subject2')&&fncGetSubject2Show" :required="requiredList.subject2"
:label="fncGetSubject2Label" prop="subject2">
<jnpf-popup-select v-model="dataForm.subject2" :disabled="judgeWrite('subject2')"
@change="changeData('subject2',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="fncGetSubject2ParamList" clearable propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='subject_name' vModel='subject2'
:columnOptions="subjectColumnOptionsA" :interfaceId="fncGetSubject2InterfaceId" :pageSize="20"
placeholder="请选择" type="popup" :style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('subject3')&&fncGetSubject3Show" :required="requiredList.subject3"
:label="fncGetSubject3Label" prop="subject3">
<jnpf-popup-select v-model="dataForm.subject3" :disabled="judgeWrite('subject3')"
@change="changeData('subject3',-1)" :rowIndex="null" :formData="dataForm"
:templateJson="fncGetSubject3ParamList" clearable propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='subject_name' vModel='subject3'
:columnOptions="subjectColumnOptionsA" :interfaceId="fncGetSubject3InterfaceId" :pageSize="20"
placeholder="请选择" type="popup" :style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>交货和运输信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('deliveryModel')" :required="requiredList.deliveryModel" label="交货方式"
prop="deliveryModel">
<jnpf-select v-model="dataForm.deliveryModel" :disabled="judgeWrite('deliveryModel')"
@change="changeData('deliveryModel',-1)" clearable placeholder="请选择" :props="deliveryModelProps"
:options="deliveryModelOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('deliveryLocation')" :required="requiredList.deliveryLocation"
label="交货地点 " prop="deliveryLocation">
<u-input v-model="dataForm.deliveryLocation" :disabled="judgeWrite('deliveryLocation')"
@change="changeData('deliveryLocation',-1)" input-align='right' clearable placeholder="请输入"
:style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('modeTransport')" :required="requiredList.modeTransport" label="运输方式"
prop="modeTransport">
<jnpf-select v-model="dataForm.modeTransport" :disabled="judgeWrite('modeTransport')"
@change="changeData('modeTransport',-1)" clearable placeholder="请选择" :props="modeTransportProps"
:options="modeTransportOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('costBearingMian')" :required="requiredList.costBearingMian" label="费用承担主体"
prop="costBearingMian">
<jnpf-select v-model="dataForm.costBearingMian" :disabled="judgeWrite('costBearingMian')"
@change="changeData('costBearingMian',-1)" clearable placeholder="请选择"
:props="costBearingMianProps" :options="costBearingMianOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>合同条款信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('pricingModel')" :required="requiredList.pricingModel" label="定价模式 "
prop="pricingModel">
<jnpf-select v-model="dataForm.pricingModel" :disabled="judgeWrite('pricingModel')"
@change="changeData('pricingModel',-1)" clearable placeholder="请选择" :props="pricingModelProps"
:options="pricingModelOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="jnpf-table" v-if="judgeShow('contractLPriceFormulaList')">
<view class="jnpf-table-item" v-for="(item,i) in dataForm.contractLPriceFormulaList" :key="i">
<view class="jnpf-table-item-title u-flex u-row-between">
<text class="jnpf-table-item-title-num">价格公式({{i+1}})</text>
<view class="jnpf-table-item-title-action"
v-if=" !judgeWrite('contractLPriceFormulaList') && dataForm.contractLPriceFormulaList.length>0"
@click="delcontractlpriceformulaList(i)">删除</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-priceFormulaCode')"
:required="requiredList['contractlpriceformulaList-priceFormulaCode']" label="公式编码">
<u-input v-model="dataForm.contractLPriceFormulaList[i].priceFormulaCode" disabled
@change="changeData('contractlpriceformula-priceFormulaCode',i)" input-align='right'
placeholder="系统自动生成" :style='{"width":"100%"}' readonly>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-priceFormulaType')"
:required="requiredList['contractlpriceformulaList-priceFormulaType']" label="价格公式类型">
<jnpf-select v-model="dataForm.contractLPriceFormulaList[i].priceFormulaType"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-priceFormulaType')"
@change="changeData('contractlpriceformula-priceFormulaType',i)" clearable
placeholder="请选择" :props="contractlpriceformulapriceFormulaTypeProps"
:options="contractlpriceformulapriceFormulaTypeOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-fixedProfit1')"
:required="requiredList['contractlpriceformulaList-fixedProfit1']" label="固定利润1">
<u-input v-model="dataForm.contractLPriceFormulaList[i].fixedProfit1"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-fixedProfit1')"
@change="changeData('contractlpriceformula-fixedProfit1',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-fixedProfit2')"
:required="requiredList['contractlpriceformulaList-fixedProfit2']" label="固定利润2">
<u-input v-model="dataForm.contractLPriceFormulaList[i].fixedProfit2"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-fixedProfit2')"
@change="changeData('contractlpriceformula-fixedProfit2',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-fixedAmount')"
:required="requiredList['contractlpriceformulaList-fixedAmount']" label="固定金额">
<u-input v-model="dataForm.contractLPriceFormulaList[i].fixedAmount"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-fixedAmount')"
@change="changeData('contractlpriceformula-fixedAmount',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-accountCost')"
:required="requiredList['contractlpriceformulaList-accountCost']" label="户头费">
<u-input v-model="dataForm.contractLPriceFormulaList[i].accountCost"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-accountCost')"
@change="changeData('contractlpriceformula-accountCost',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-handleCost')"
:required="requiredList['contractlpriceformulaList-handleCost']" label="装卸费">
<u-input v-model="dataForm.contractLPriceFormulaList[i].handleCost"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-handleCost')"
@change="changeData('contractlpriceformula-handleCost',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-reshipmentCost')"
:required="requiredList['contractlpriceformulaList-reshipmentCost']" label="倒运费">
<u-input v-model="dataForm.contractLPriceFormulaList[i].reshipmentCost"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-reshipmentCost')"
@change="changeData('contractlpriceformula-reshipmentCost',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-otherCost1')"
:required="requiredList['contractlpriceformulaList-otherCost1']" label="其它费用1">
<u-input v-model="dataForm.contractLPriceFormulaList[i].otherCost1"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-otherCost1')"
@change="changeData('contractlpriceformula-otherCost1',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-otherCost2')"
:required="requiredList['contractlpriceformulaList-otherCost2']" label="其它费用2">
<u-input v-model="dataForm.contractLPriceFormulaList[i].otherCost2"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-otherCost2')"
@change="changeData('contractlpriceformula-otherCost2',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-otherCost3')"
:required="requiredList['contractlpriceformulaList-otherCost3']" label="其它费用3">
<u-input v-model="dataForm.contractLPriceFormulaList[i].otherCost3"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-otherCost3')"
@change="changeData('contractlpriceformula-otherCost3',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-otherCost4')"
:required="requiredList['contractlpriceformulaList-otherCost4']" label="其它费用4">
<u-input v-model="dataForm.contractLPriceFormulaList[i].otherCost4"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-otherCost4')"
@change="changeData('contractlpriceformula-otherCost4',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-settlementTonnage')"
:required="requiredList['contractlpriceformulaList-settlementTonnage']" label="结算吨数">
<u-input v-model="dataForm.contractLPriceFormulaList[i].settlementTonnage"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-settlementTonnage')"
@change="changeData('contractlpriceformula-settlementTonnage',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-correspondTonnage')"
:required="requiredList['contractlpriceformulaList-correspondTonnage']" label="对应吨数">
<u-input v-model="dataForm.contractLPriceFormulaList[i].correspondTonnage"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-correspondTonnage')"
@change="changeData('contractlpriceformula-correspondTonnage',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-saleTonnage')"
:required="requiredList['contractlpriceformulaList-saleTonnage']" label="销售吨数">
<u-input v-model="dataForm.contractLPriceFormulaList[i].saleTonnage"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-saleTonnage')"
@change="changeData('contractlpriceformula-saleTonnage',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-taxRate')"
:required="requiredList['contractlpriceformulaList-taxRate']" label="税率">
<u-input v-model="dataForm.contractLPriceFormulaList[i].taxRate"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-taxRate')"
@change="changeData('contractlpriceformula-taxRate',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-taxRateCustomer')"
:required="requiredList['contractlpriceformulaList-taxRateCustomer']" label="客户税负率">
<u-input v-model="dataForm.contractLPriceFormulaList[i].taxRateCustomer"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-taxRateCustomer')"
@change="changeData('contractlpriceformula-taxRateCustomer',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-taxRateYellowBull')"
:required="requiredList['contractlpriceformulaList-taxRateYellowBull']" label="黄牛税负率">
<u-input v-model="dataForm.contractLPriceFormulaList[i].taxRateYellowBull"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-taxRateYellowBull')"
@change="changeData('contractlpriceformula-taxRateYellowBull',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-taxRateInvoicingCompany')"
:required="requiredList['contractlpriceformulaList-taxRateInvoicingCompany']"
label="开票公司税负率">
<u-input v-model="dataForm.contractLPriceFormulaList[i].taxRateInvoicingCompany"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-taxRateInvoicingCompany')"
@change="changeData('contractlpriceformula-taxRateInvoicingCompany',i)"
input-align='right' clearable placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpriceformulaList-fundRate')"
:required="requiredList['contractlpriceformulaList-fundRate']" label="资金利率">
<u-input v-model="dataForm.contractLPriceFormulaList[i].fundRate"
:disabled="judgeWrite('contractLPriceFormulaList')||judgeWrite('contractlpriceformulaList-fundRate')"
@change="changeData('contractlpriceformula-fundRate',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
</view>
<view class="jnpf-table-addBtn" @click="addcontractlpriceformulaList"
v-if="!judgeWrite('contractLPriceFormulaList')">
<u-icon name="plus" color="#2979ff"></u-icon>
<span>{{dataForm.contractLPriceFormulaList.length==0?"添加价格公式":"添加"}}</span>
</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>商品明细
</u-form-item>
</view>
<view class="jnpf-table" v-if="judgeShow('contractLCommodityList')">
<u-collapse>
<u-collapse-item :title="dataForm.contractLCommodityList[i].commodityName+'(' + (i+1) + ') '" v-for="(item,i) in dataForm.contractLCommodityList" :key="i">
<!-- <view class="jnpf-table-item-title u-flex u-row-between">
<text class="jnpf-table-item-title-num">商品明细({{i+1}})</text>
<view class="jnpf-table-item-title-action"
v-if=" !judgeWrite('contractLCommodityList') && dataForm.contractLCommodityList.length>0"
@click="delcontractlcommodityList(i)">删除</view>
</view> -->
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-productId')"
:required="requiredList['contractlcommodityList-productId']" label="商品ID">
<jnpf-popup-select v-model="dataForm.contractLCommodityList[i].productId"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-productId')"
@change="changeData('contractlcommodity-productId',i)" :rowIndex="i"
:formData="dataForm" :templateJson="interfaceRes.contractlcommodityproductId" clearable
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='id' :vModel="'productId'+i"
:columnOptions="contractlcommodityproductIdColumnOptions"
interfaceId="530288111456878597" :pageSize="20" placeholder="请选择" type="popup"
:style='{"width":"100%"}'>
</jnpf-popup-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-commodityCode')"
:required="requiredList['contractlcommodityList-commodityCode']" label="商品编码">
<u-input v-model="dataForm.contractLCommodityList[i].commodityCode"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-commodityCode')"
@change="changeData('contractlcommodity-commodityCode',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}' readonly>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-commodityName')"
:required="requiredList['contractlcommodityList-commodityName']" label="商品名称">
<u-input v-model="dataForm.contractLCommodityList[i].commodityName"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-commodityName')"
@change="changeData('contractlcommodity-commodityName',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}' readonly>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-specifications')"
:required="requiredList['contractlcommodityList-specifications']" label="商品规格">
<u-input v-model="dataForm.contractLCommodityList[i].specifications"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-specifications')"
@change="changeData('contractlcommodity-specifications',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}' readonly>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-inventoryUnitId')"
:required="requiredList['contractlcommodityList-inventoryUnitId']" label="库存单位">
<u-input :value="getProductUnitName(dataForm.contractLCommodityList[i].inventoryUnitId)"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-inventoryUnitId')"
@change="changeData('contractlcommodity-inventoryUnitId',i)" input-align='right'
clearable placeholder="请输入" :style='{"width":"100%"}' readonly>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-procureUnit')"
:required="requiredList['contractlcommodityList-procureUnit']" label="采购单位">
<jnpf-select v-model="dataForm.contractLCommodityList[i].procureUnit"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-procureUnit')"
@change="changeData('contractlcommodity-procureUnit',i)" clearable placeholder="请选择"
:props="contractlcommodityprocureUnitProps"
:options="contractlcommodityprocureUnitOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-number')"
:required="requiredList['contractlcommodityList-number']" label="数量">
<u-input v-model="dataForm.contractLCommodityList[i].number"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-number')"
@change="changeData('contractlcommodity-number',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-taxRate')"
:required="requiredList['contractlcommodityList-taxRate']" label="税率">
<u-input v-model="dataForm.contractLCommodityList[i].taxRate"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-taxRate')"
@change="changeData('contractlcommodity-taxRate',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input><span style="padding: 0px 5px">%</span>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-priceRate')"
:required="requiredList['contractlcommodityList-priceRate']" label="含税单价">
<u-input v-model="dataForm.contractLCommodityList[i].priceRate"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-priceRate')"
@change="changeData('contractlcommodity-priceRate',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlcommodityList-totalRate')"
:required="requiredList['contractlcommodityList-totalRate']" label="含税总金额">
<u-input v-model="dataForm.contractLCommodityList[i].totalRate"
:disabled="judgeWrite('contractLCommodityList')||judgeWrite('contractlcommodityList-totalRate')"
@change="changeData('contractlcommodity-totalRate',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
</u-collapse-item>
</u-collapse>
<view class="jnpf-table-addBtn" @click="addcontractlcommodityList"
v-if="!judgeWrite('contractLCommodityList')">
<u-icon name="plus" color="#2979ff"></u-icon>
<span>{{dataForm.contractLCommodityList.length==0?"添加商品明细":"添加"}}</span>
</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>费用条款
</u-form-item>
</view>
<view class="jnpf-table" v-if="judgeShow('contractLFeeClauseList')">
<view class="jnpf-table-item" v-for="(item,i) in dataForm.contractLFeeClauseList" :key="i">
<view class="jnpf-table-item-title u-flex u-row-between">
<text class="jnpf-table-item-title-num">费用条款({{i+1}})</text>
<view class="jnpf-table-item-title-action"
v-if=" !judgeWrite('contractLFeeClauseList') && dataForm.contractLFeeClauseList.length>0"
@click="delcontractLFeeClauseList(i)">删除</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractLFeeClauseList-feeType')"
:required="requiredList['contractLFeeClauseList-feeType']" label="费用类型">
<jnpf-select v-model="dataForm.contractLFeeClauseList[i].feeType"
:disabled="judgeWrite('contractLFeeClauseList')||judgeWrite('contractLFeeClauseList-feeType')"
@change="changeData('contractLFeeClause-feeType',i)" clearable filterable
placeholder="请选择" :props="contractLFeeClausefeeTypeProps"
:options="contractLFeeClausefeeTypeOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractLFeeClauseList-price')"
:required="requiredList['contractLFeeClauseList-price']" label="金额">
<jnpf-number-box v-model="dataForm.contractLFeeClauseList[i].price"
:disabled="judgeWrite('contractLFeeClauseList')||judgeWrite('contractLFeeClauseList-price')"
@change="changeData('contractLFeeClause-price',i)" :precision="2" addonAfter="元"
:controls="false" placeholder="数字文本" :step="1">
</jnpf-number-box>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractLFeeClauseList-remark')"
:required="requiredList['contractLFeeClauseList-remark']" label="备注">
<u-input v-model="dataForm.contractLFeeClauseList[i].remark"
:disabled="judgeWrite('contractLFeeClauseList')||judgeWrite('contractLFeeClauseList-remark')"
@change="changeData('contractLFeeClause-remark',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
</view>
<view class="jnpf-table-addBtn" @click="addcontractLFeeClauseList"
v-if="!judgeWrite('contractLFeeClauseList')">
<u-icon name="plus" color="#2979ff"></u-icon>
<span>{{dataForm.contractLFeeClauseList.length==0?"添加费用条款":"添加"}}</span>
</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>付款节点
</u-form-item>
</view>
<view class="jnpf-table" v-if="judgeShow('contractLPaymentList')">
<view class="jnpf-table-item" v-for="(item,i) in dataForm.contractLPaymentList" :key="i">
<view class="jnpf-table-item-title u-flex u-row-between">
<text class="jnpf-table-item-title-num">付款节点({{i+1}})</text>
<view class="jnpf-table-item-title-action"
v-if=" !judgeWrite('contractLPaymentList') && dataForm.contractLPaymentList.length>0"
@click="delcontractlpaymentList(i)">删除</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpaymentList-paymentNode')"
:required="requiredList['contractlpaymentList-paymentNode']" label="收付款节点">
<jnpf-select v-model="dataForm.contractLPaymentList[i].paymentNode"
:disabled="judgeWrite('contractLPaymentList')||judgeWrite('contractlpaymentList-paymentNode')"
@change="changeData('contractlpayment-paymentNode',i)" clearable placeholder="请选择"
:props="contractlpaymentpaymentNodeProps" :options="contractlpaymentpaymentNodeOptions"
:style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpaymentList-paymentMethod')"
:required="requiredList['contractlpaymentList-paymentMethod']" label="收付款方式">
<jnpf-select v-model="dataForm.contractLPaymentList[i].paymentMethod"
:disabled="judgeWrite('contractLPaymentList')||judgeWrite('contractlpaymentList-paymentMethod')"
@change="changeData('contractlpayment-paymentMethod',i)" clearable placeholder="请选择"
:props="contractlpaymentpaymentMethodProps"
:options="contractlpaymentpaymentMethodOptions" :style='{"width":"100%"}'>
</jnpf-select>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpaymentList-paymentRatio')"
:required="requiredList['contractlpaymentList-paymentRatio']" label="付款比例">
<jnpf-number-box v-model="dataForm.contractLPaymentList[i].paymentRatio"
:disabled="judgeWrite('contractLPaymentList')||judgeWrite('contractlpaymentList-paymentRatio')"
@change="changeData('contractlpayment-paymentRatio',i)" :precision="1" addonAfter="%"
:controls="false" placeholder="请输入" :step="1">
</jnpf-number-box>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpaymentList-price')"
:required="requiredList['contractlpaymentList-price']" label="金额">
<jnpf-number-box v-model="dataForm.contractLPaymentList[i].price"
:disabled="judgeWrite('contractLPaymentList')||judgeWrite('contractlpaymentList-price')"
@change="changeData('contractlpayment-price',i)" :precision="2" addonAfter="元"
:controls="false" placeholder="请输入" :step="1">
</jnpf-number-box>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractlpaymentList-remark')"
:required="requiredList['contractlpaymentList-remark']" label="备注">
<u-input v-model="dataForm.contractLPaymentList[i].remark"
:disabled="judgeWrite('contractLPaymentList')||judgeWrite('contractlpaymentList-remark')"
@change="changeData('contractlpayment-remark',i)" input-align='right' clearable
placeholder="请输入" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
</view>
<view class="jnpf-table-addBtn" @click="addcontractlpaymentList"
v-if="!judgeWrite('contractLPaymentList')">
<u-icon name="plus" color="#2979ff"></u-icon>
<span>{{dataForm.contractLPaymentList.length==0?"添加付款节点":"添加"}}</span>
</view>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('totalAmount')" :required="requiredList.totalAmount" label="合计金额(人民币)"
prop="totalAmount" label-position="top" label-align="left">
<jnpf-number-box v-model="dataForm.totalAmount" :disabled="judgeWrite('totalAmount')"
@change="changeData('totalAmount',-1)" :precision="2" addonAfter="元" :controls="false"
placeholder="数字文本" :step="1">
</jnpf-number-box>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('amountCapitalization')" :required="requiredList.amountCapitalization"
label="大写金额(人民币)" prop="amountCapitalization" label-position="top" label-align="left">
<u-input v-model="dataForm.amountCapitalization" :disabled="judgeWrite('amountCapitalization')"
@change="changeData('amountCapitalization',-1)" input-align='right' clearable placeholder="请输入"
:style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>其他信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractRequirement')" :required="requiredList.contractRequirement"
label="合同要求" prop="contractRequirement">
<u-input v-model="dataForm.contractRequirement" :disabled="judgeWrite('contractRequirement')"
@change="changeData('contractRequirement',-1)" input-align='right' placeholder="请输入"
type="textarea" :style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('remark')" :required="requiredList.remark" label="备注" prop="remark">
<u-input v-model="dataForm.remark" :disabled="judgeWrite('remark')"
@change="changeData('remark',-1)" input-align='right' placeholder="请输入" type="textarea"
:style='{"width":"100%"}'>
</u-input>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item>
<view style="float: left; width:8px; height: 16px;background-color: cadetblue;margin-right: 8px;">
</view>附件信息
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('contractAppendices')" :required="requiredList.contractAppendices"
label="合同附件" prop="contractAppendices" label-position="top" label-align="left">
<jnpf-file v-model="dataForm.contractAppendices" :disabled="judgeWrite('contractAppendices')"
@change="changeData('contractAppendices',-1)" :list="dataForm.contractAppendices"
tipText="支持格式:.rar .zip .doc .docx .pdf 单个文件不能超过20MB" sizeUnit="MB" :fileSize="20" :limit="9"
pathType="defaultPath" :isAccount="0">
</jnpf-file>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('ancillaryDocuments')" :required="requiredList.ancillaryDocuments"
label="附属文件" prop="ancillaryDocuments" label-position="top" label-align="left">
<jnpf-file v-model="dataForm.ancillaryDocuments" :disabled="judgeWrite('ancillaryDocuments')"
@change="changeData('ancillaryDocuments',-1)" :list="dataForm.ancillaryDocuments"
tipText="支持格式:.rar .zip .doc .docx .pdf 单个文件不能超过20MB" sizeUnit="MB" :fileSize="20" :limit="9"
pathType="defaultPath" :isAccount="0">
</jnpf-file>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('transactionAppendices')" :required="requiredList.transactionAppendices"
label="关联交易合同(二级)" prop="transactionAppendices" label-position="top" label-align="left">
<jnpf-file v-model="dataForm.transactionAppendices" :disabled="judgeWrite('transactionAppendices')"
@change="changeData('transactionAppendices',-1)" :list="dataForm.transactionAppendices"
tipText="支持格式:.rar .zip .doc .docx .pdf 单个文件不能超过20MB" sizeUnit="MB" :fileSize="20" :limit="9"
pathType="defaultPath" :isAccount="0">
</jnpf-file>
</u-form-item>
</view>
<view class="u-p-l-20 u-p-r-20 form-item-box">
<u-form-item v-if="judgeShow('transactionAppendices2')" :required="requiredList.transactionAppendices2"
label="关联交易合同(三级)" prop="transactionAppendices2" label-position="top" label-align="left">
<jnpf-file v-model="dataForm.transactionAppendices2"
:disabled="judgeWrite('transactionAppendices2')"
@change="changeData('transactionAppendices2',-1)" :list="dataForm.transactionAppendices2"
tipText="支持格式:.rar .zip .doc .docx .pdf 单个文件不能超过20MB" sizeUnit="MB" :fileSize="20" :limit="9"
pathType="defaultPath" :isAccount="0">
</jnpf-file>
</u-form-item>
</view>
</u-form>
<u-modal v-model="show" :content="content" width='70%' border-radius="16"
:content-style="{fontSize: '28rpx',padding: '20rpx',lineHeight: '44rpx',textAlign: 'left'}"
:titleStyle="{padding: '20rpx'}" :confirm-style="{height: '80rpx',lineHeight: '80rpx'}" :title="title"
confirm-text="确定">
</u-modal>
</view>
</template>
<script>
import {
getPopSelect,
getDictionaryDataSelector,
getDataInterfaceRes,
getDefaultCurrentValueUserId,
getDefaultCurrentValueDepartmentId
} from '@/api/common'
import comMixin from '../../../workFlow/workFlowForm/mixin'
import {
getDateDay,
getLaterData,
getBeforeData,
getBeforeTime,
getLaterTime
} from '@/components/index.js'
import request from '@/utils/request'
export default {
mixins: [comMixin],
data() {
return {
idList: [],
index: 0,
actionList: [],
actionListLength: false,
showAction: false,
btnLoading: false,
loading: false,
text: '提示:测试文本',
tableKey: '',
dataForm: {
id: "",
contractType: "1",
contractTemplateId: "",
contractNumber: '',
contractName: '',
contractNo: '',
contractSignedTime: '',
businessId: "",
contractPeriodTime: '',
contractPeriodTimeEnd: '',
deptId: [],
subject: "522407918746741061",
procurementModel: "",
relatedContractId: "",
subject2: "",
subject3: "",
deliveryModel: "",
deliveryLocation: '',
modeTransport: "",
costBearingMian: "",
pricingModel: "",
totalAmount: 0,
amountCapitalization: '',
contractRequirement: '',
remark: '',
contractAppendices: [],
ancillaryDocuments: [],
transactionAppendices: [],
transactionAppendices2: [],
contractLabel: [],
contractLPriceFormulaList: [],
contractLCommodityList: [],
contractLFeeClauseList: [],
contractLPaymentList: [],
},
rules: {
contractName: [{
required: true,
message: '合同名称请输入',
}, ],
contractPeriodTime: [{
required: true,
message: '有效期开始 请选择',
}, ],
contractPeriodTimeEnd: [{
required: true,
message: '有效期结束 请选择',
}, ],
procurementModel: [{
required: true,
message: '采购模式请选择',
}, ],
relatedContractId: [{
required: true,
message: '关联销售合同请选择',
}, ],
deliveryModel: [{
required: true,
message: '交货方式请选择',
}, ],
deliveryLocation: [{
required: true,
message: '交货地点 请输入',
}, ],
modeTransport: [{
required: true,
message: '运输方式请选择',
}, ],
costBearingMian: [{
required: true,
message: '费用承担主体请选择',
}, ],
pricingModel: [{
required: true,
message: '定价模式 请选择',
}, ],
totalAmount: [{
required: true,
message: '合计金额(人民币)数字文本',
}, ],
amountCapitalization: [{
required: true,
message: '大写金额(人民币)请输入',
}, ],
},
contractTypeOptions: [],
contractTypeProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
contractTemplateIdColumnOptions: [{
"label": "合同模板",
"value": "name"
},
{
"label": "合同类型",
"value": "type"
},
{
"label": "状态",
"value": "status"
},
],
businessIdColumnOptions: [{
"label": "名称",
"value": "name"
}, ],
subjectColumnOptions: [{
"label": "类型",
"value": "subject_basic_type"
},
{
"label": "级别",
"value": "calssify"
},
{
"label": "主体名称",
"value": "name"
},
{
"label": "社会统一信息代码",
"value": "information_code"
},
{
"label": "付款方式",
"value": "payment_method"
},
{
"label": "合作方式",
"value": "collaboration_method"
},
{
"label": "结算方式",
"value": "settlement_method"
},
{
"label": "预付比例",
"value": "advance_ratio"
},
{
"label": "账期",
"value": "account_period"
},
{
"label": "压款方式",
"value": "underpayment_method"
},
{
"label": "保证金方式",
"value": "margin_method"
},
{
"label": "逾期利率",
"value": "overdue_interest_rate"
},
],
subjectColumnOptionsA: [{
label: "主体名称",
value: "subject_name",
width: 200
},
{
label: "类型",
value: "subject_basic_type_name",
width: 80
},
{
label: "级别",
value: "calssify_name",
width: 60
},
{
label: "所属公司",
value: "company_name",
width: 170
},
{
label: "所属部门",
value: "department_name",
width: 170
},
{
label: "社会统一信息代码",
value: "information_code",
width: 200
},
{
label: "付款方式",
value: "payment_method_name",
width: 120
},
{
label: "合作方式",
value: "collaboration_method_name",
width: 120
},
{
label: "结算方式",
value: "settlement_method_name",
width: 120
},
{
label: "预付比例",
value: "advance_ratio_str",
width: 120
},
{
label: "账期",
value: "account_period_str",
width: 120
},
{
label: "压款方式",
value: "underpayment_method_str",
width: 120
},
{
label: "保证金方式",
value: "margin_method_str",
width: 120
},
{
label: "逾期利率",
value: "overdue_interest_rate_str",
width: 120
},
{
label: "可用业务线",
value: "busuness_line_name",
width: 400
}
],
procurementModelOptions: [],
procurementModelProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
relatedContractIdColumnOptions: [{
"label": "销售合同",
"value": "contract_name"
}, ],
subject2ColumnOptions: [{
"label": "类型",
"value": "subject_basic_type"
},
{
"label": "级别",
"value": "calssify"
},
{
"label": "主体名称",
"value": "name"
},
],
subject3ColumnOptions: [{
"label": "类型",
"value": "subject_basic_type"
},
{
"label": "级别",
"value": "calssify"
},
{
"label": "主体名称",
"value": "name"
},
],
deliveryModelOptions: [],
deliveryModelProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
modeTransportOptions: [],
modeTransportProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
costBearingMianOptions: [],
costBearingMianProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
pricingModelOptions: [],
pricingModelProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
contractLabelOptions: [],
contractLabelProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
contractlpriceformulapriceFormulaTypeOptions: [],
contractlpriceformulapriceFormulaTypeProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
contractlcommodityproductIdColumnOptions: [{
"label": "商品编码",
"value": "code"
},
{
"label": "商品名称",
"value": "name"
},
{
"label": "商品规格",
"value": "spec"
},
{
"label": "库存单位",
"value": "inventory_unit_name"
},
{
"label": "采购单位",
"value": "order_main_unit_name"
},
{
"label": "销售单位",
"value": "sales_main_unit_name"
},
],
contractlcommodityprocureUnitOptions: [{
"fullName": "选项一",
"id": "1"
}, {
"fullName": "选项二",
"id": "2"
}],
contractlcommodityprocureUnitProps: {
"label": "fullName",
"value": "id",
"multiple": false,
"children": ""
},
contractLFeeClausefeeTypeOptions: [],
contractLFeeClausefeeTypeProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
contractlpaymentpaymentNodeOptions: [],
contractlpaymentpaymentNodeProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
contractlpaymentpaymentMethodOptions: [],
contractlpaymentpaymentMethodProps: {
"label": "fullName",
"value": "enCode",
"multiple": false,
"children": ""
},
labelwidth: 180 * 1.5,
menuId: '',
jurisdictionType: '',
ruleList: {
contractLPriceFormulaList: {},
contractLCommodityList: {},
contractLFeeClauseList: {
'feeType': '费用类型不能为空',
},
contractLPaymentList: {},
},
interfaceRes: {
contractType: [],
contractTemplateId: [],
contractNumber: [],
contractName: [],
contractNo: [],
contractSignedTime: [],
businessId: [],
contractPeriodTime: [],
contractPeriodTimeEnd: [],
deptId: [],
subject: [{
dataType: "int",
defaultValue: "1",
field: "subject_basic_type",
fieldName: "1-客户|2-供应商|3-服务商",
id: "tcNti32",
required: 0
},
{
dataType: "int",
defaultValue: "1",
field: "calssify",
fieldName: "1-一级|2-二级|3-三级",
id: "yWlti32",
required: 0
},
{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}
],
subject: [{
dataType: "int",
defaultValue: "1",
field: "subject_basic_type",
fieldName: "1-客户|2-供应商|3-服务商",
id: "tcNti32",
required: 0
},
{
dataType: "int",
defaultValue: "1",
field: "calssify",
fieldName: "1-一级|2-二级|3-三级",
id: "yWlti32",
required: 0
},
{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}
],
procurementModel: [],
relatedContractId: [],
subject2: [],
subject3: [],
deliveryModel: [],
deliveryLocation: [],
modeTransport: [],
costBearingMian: [],
pricingModel: [],
totalAmount: [],
amountCapitalization: [],
contractRequirement: [],
remark: [],
contractAppendices: [],
ancillaryDocuments: [],
transactionAppendices: [],
transactionAppendices2: [],
contractLabel: [],
contractlpriceformulapriceFormulaCode: [],
contractlpriceformulapriceFormulaType: [],
contractlpriceformulafixedProfit1: [],
contractlpriceformulafixedProfit2: [],
contractlpriceformulafixedAmount: [],
contractlpriceformulaaccountCost: [],
contractlpriceformulahandleCost: [],
contractlpriceformulareshipmentCost: [],
contractlpriceformulaotherCost1: [],
contractlpriceformulaotherCost2: [],
contractlpriceformulaotherCost3: [],
contractlpriceformulaotherCost4: [],
contractlpriceformulasettlementTonnage: [],
contractlpriceformulacorrespondTonnage: [],
contractlpriceformulasaleTonnage: [],
contractlpriceformulataxRate: [],
contractlpriceformulataxRateCustomer: [],
contractlpriceformulataxRateYellowBull: [],
contractlpriceformulataxRateInvoicingCompany: [],
contractlpriceformulafundRate: [],
contractlcommodityproductId: [],
contractlcommoditycommodityCode: [],
contractlcommoditycommodityName: [],
contractlcommodityspecifications: [],
contractlcommodityinventoryUnitId: [],
contractlcommodityprocureUnit: [],
contractlcommoditynumber: [],
contractlcommoditytaxRate: [],
contractlcommoditypriceRate: [],
contractlcommoditytotalRate: [],
contractLFeeClausefeeType: [],
contractLFeeClauseprice: [],
contractLFeeClauseremark: [],
contractlpaymentpaymentNode: [],
contractlpaymentpaymentMethod: [],
contractlpaymentpaymentRatio: [],
contractlpaymentprice: [],
contractlpaymentremark: [],
},
regList: {
contractLPriceFormulaList: {
priceFormulaCode: [],
priceFormulaType: [],
fixedProfit1: [],
fixedProfit2: [],
fixedAmount: [],
accountCost: [],
handleCost: [],
reshipmentCost: [],
otherCost1: [],
otherCost2: [],
otherCost3: [],
otherCost4: [],
settlementTonnage: [],
correspondTonnage: [],
saleTonnage: [],
taxRate: [],
taxRateCustomer: [],
taxRateYellowBull: [],
taxRateInvoicingCompany: [],
fundRate: [],
},
contractLCommodityList: {
productId: [],
commodityCode: [],
commodityName: [],
specifications: [],
inventoryUnitId: [],
procureUnit: [],
number: [],
taxRate: [],
priceRate: [],
totalRate: [],
},
contractLFeeClauseList: {
feeType: [],
price: [],
remark: [],
},
contractLPaymentList: {
paymentNode: [],
paymentMethod: [],
paymentRatio: [],
price: [],
remark: [],
},
},
ableAll: {
deptIdableIds: [],
},
childIndex: -1,
dataValue: {},
isEdit: false,
userInfo: {},
formatType: {
"yyyy": "yyyy",
"yyyy-MM": "yyyy-mm",
"yyyy-MM-dd": "yyyy-mm-dd",
"yyyy-MM-dd HH:mm": "yyyy-mm-dd hh:MM",
"yyyy-MM-dd HH:mm:ss": "yyyy-mm-dd hh:MM:ss",
"HH:mm:ss": "hh:MM:ss",
"HH:mm": "hh:MM"
},
content: '',
title: '',
show: false,
paramListSubject11: [{
dataType: "int",
defaultValue: "1",
field: "subject_basic_type",
fieldName: "1-客户|2-供应商|3-服务商",
id: "tcNti32",
required: 0
},
{
dataType: "int",
defaultValue: "1",
field: "calssify",
fieldName: "1-一级|2-二级|3-三级",
id: "yWlti32",
required: 0
},
{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}
],
paramListSubject21: [{
dataType: "int",
defaultValue: "1",
field: "subject_basic_type",
fieldName: "1-客户|2-供应商|3-服务商",
id: "tcNti32",
required: 0
},
{
dataType: "int",
defaultValue: "2",
field: "calssify",
fieldName: "1-一级|2-二级|3-三级",
id: "yWlti32",
required: 0
},
{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}
],
paramListSubject12: [{
dataType: "int",
defaultValue: "2",
field: "subject_basic_type",
fieldName: "1-客户|2-供应商|3-服务商",
id: "tcNti32",
required: 0
},
{
dataType: "int",
defaultValue: "1",
field: "calssify",
fieldName: "1-一级|2-二级|3-三级",
id: "yWlti32",
required: 0
},
{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}
],
paramListSubject22: [{
dataType: "int",
defaultValue: "2",
field: "subject_basic_type",
fieldName: "1-客户|2-供应商|3-服务商",
id: "tcNti32",
required: 0
},
{
dataType: "int",
defaultValue: "2",
field: "calssify",
fieldName: "1-一级|2-二级|3-三级",
id: "yWlti32",
required: 0
},
{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}
],
paramListSubject32: [{
dataType: "int",
defaultValue: "2",
field: "subject_basic_type",
fieldName: "1-客户|2-供应商|3-服务商",
id: "tcNti32",
required: 0
},
{
dataType: "int",
defaultValue: "3",
field: "calssify",
fieldName: "1-一级|2-二级|3-三级",
id: "yWlti32",
required: 0
},
{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}
],
paramListSubjectx3: [{
dataType: "varchar",
defaultValue: "",
field: "business_line_id",
fieldName: "业务线ID",
id: "R00Zh32",
required: 0
}],
optionsProductUnit: [],
listQuery: {
keyword: "",
currentPage: 1,
pageSize: 100000
},
}
},
onLoad(option) {
uni.$on('linkPageConfirm', (subVal) => {
if (this.tableKey) {
for (let i = 0; i < subVal.length; i++) {
let t = subVal[i]
if (this['get' + this.tableKey]) {
this['get' + this.tableKey](t)
}
}
this.childIndex = -1
this.collapse()
}
})
this.jurisdictionType = option.jurisdictionType
this.menuId = option.menuId
this.userInfo = uni.getStorageSync('userInfo') || {}
this.dataForm.id = option.id || 0
let _title = ""
if (option.jurisdictionType == 'btn_edit') {
_title = "编辑"
}
if (option.jurisdictionType == 'btn_detail') {
_title = "详情"
}
if (option.jurisdictionType == 'btn_add') {
_title = "新增"
}
if (_title) {
uni.setNavigationBarTitle({
title: _title
})
}
this.selfInit()
this.initDefaultData()
this.dataAll()
this.initData()
this.dataValue = JSON.parse(JSON.stringify(this.dataForm))
this.idList = option.idList ? option.idList.split(",") : []
for (let i = 0; i < this.idList.length; i++) {
if (this.idList[i] == option.id) {
this.index = i;
}
}
},
computed: {
fncGetSubject2Show() {
switch (this.dataForm.contractType) {
case "1":
case "2":
return true;
break;
default:
return false;
break;
}
},
fncGetSubject3Show() {
switch (this.dataForm.contractType) {
case "1":
return true;
break;
default:
return false;
break;
}
},
fncGetSubjectLabel() {
switch (this.dataForm.contractType) {
case "1":
return "供应商";
break;
case "2":
return "客户";
break;
default:
return "服务商";
break;
}
},
fncGetSubject2Label() {
switch (this.dataForm.contractType) {
case "1":
return "关联供应商(二级)";
break;
case "2":
return "关联客户(二级)";
break;
default:
return "";
break;
}
},
fncGetSubject3Label() {
switch (this.dataForm.contractType) {
case "1":
return "关联供应商(三级)";
break;
default:
return "";
break;
}
},
fncGetSubjectParamList() {
switch (this.dataForm.contractType) {
case "1":
return this.paramListSubject12;
break;
case "2":
return this.paramListSubject11;
break;
default:
return this.paramListSubjectx3;
break;
}
},
fncGetSubject2ParamList() {
switch (this.dataForm.contractType) {
case "1":
return this.paramListSubject22;
break;
case "2":
return this.paramListSubject21;
break;
}
},
fncGetSubject3ParamList() {
switch (this.dataForm.contractType) {
case "1":
return this.paramListSubject32;
break;
}
},
fncGetSubjectInterfaceId() {
switch (this.dataForm.contractType) {
case "1":
case "2":
return "549863235596100037";
break;
default:
return "549964903897670085";
break;
}
},
fncGetSubject2InterfaceId() {
switch (this.dataForm.contractType) {
case "1":
case "2":
return "549863235596100037";
break;
default:
return "549964903897670085";
break;
}
},
fncGetSubject3InterfaceId() {
switch (this.dataForm.contractType) {
case "1":
case "2":
return "549863235596100037";
break;
default:
return "549964903897670085";
break;
}
}
},
onReady() {
this.$nextTick(() => {
setTimeout(() => {
this.$refs.dataForm.setRules(this.rules);
}, 100)
})
},
watch: {
dataForm: {
handler(val, oldVal) {
this.contractlpriceformula()
this.contractlcommodity()
this.contractLFeeClause()
this.contractlpayment()
},
deep: true
}
},
methods: {
getApiProductUnit() {
let interfaceId = "522684730601111557";
let query = {
...this.listQuery
};
getPopSelect(interfaceId, query)
.then(res => {
if (res.code == 200) {
let optionsProductUnit = [];
for (let i = 0; i < res.data.list.length; i++) {
optionsProductUnit.push({
fullName: res.data.list[i]["unit_name"],
id: res.data.list[i]["product_unit_code"]
});
}
this.optionsProductUnit = optionsProductUnit;
this.contractlcommodityprocureUnitOptions = optionsProductUnit;
}
})
.catch(() => {});
},
getProductUnitName(id) {
let fArr = this.optionsProductUnit.filter(o1 => {
return o1.id == id;
});
if (fArr.length > 0) {
return fArr[0]["fullName"];
}
},
handleAction(index) {
if (this.actionList[index].id === 'save_add' || this.actionList[index].id === 'save_proceed') {
this.submitForm(1)
} else {
this.calculation(this.actionList[index].id, index)
}
},
calculation(type, index) {
if (type === 'upper') {
this.index--
this.actionList[index + 1].disabled = false
if (this.index == 0) this.actionList[index].disabled = true
} else {
this.index++
this.actionList[index - 1].disabled = false
if (this.index == this.idList.length - 1) this.actionList[index].disabled = true
}
this.dataForm.id = this.idList[this.index]
this.initData()
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue, edit) {
if (!edit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
clickIcon(label, tipLabel) {
this.content = tipLabel
this.title = label
this.show = true
},
exist() {
let title = [];
let _ruleList = this.ruleList
for (let k in _ruleList) {
let childData = this.dataForm[k]
childData.forEach((item, index) => {
for (let model in _ruleList[k]) {
if (item[model] instanceof Array) {
if (item[model].length == 0) {
title.push(_ruleList[k][model])
}
} else if (!item[model]) {
title.push(_ruleList[k][model])
}
}
})
}
let _regList = this.regList
for (let k in _regList) {
let childData = this.dataForm[k]
for (let n in _regList[k]) {
for (let i = 0; i < _regList[k][n].length; i++) {
const element = _regList[k][n][i]
if (element.pattern) {
element.pattern = element.pattern.toString()
let start = element.pattern.indexOf('/')
let stop = element.pattern.lastIndexOf('/')
let str = element.pattern.substring(start + 1, stop)
let reg = new RegExp(str)
element.pattern = reg
}
childData.forEach((item, index) => {
if (item[n] && !element.pattern.test(item[n])) {
title.push(element.message)
}
})
}
}
}
if (title.length > 0) {
return title[0]
}
},
resetForm() {
uni.navigateBack()
},
dataAll() {
this.getcontractTypeOptions()
this.getprocurementModelOptions()
this.getdeliveryModelOptions()
this.getmodeTransportOptions()
this.getcostBearingMianOptions()
this.getpricingModelOptions()
this.getcontractLabelOptions()
this.getcontractlpriceformulapriceFormulaTypeOptions()
this.getcontractLFeeClausefeeTypeOptions()
this.getcontractlpaymentpaymentNodeOptions()
this.getcontractlpaymentpaymentMethodOptions()
this.collapse()
this.getApiProductUnit()
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValueData ? timeValue : null
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1 && timeValue) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
getcontractTypeOptions() {
getDictionaryDataSelector('519483543638772229').then(res => {
this.contractTypeOptions = res.data.list
})
},
getprocurementModelOptions() {
getDictionaryDataSelector('528908998779338757').then(res => {
this.procurementModelOptions = res.data.list
})
},
getdeliveryModelOptions() {
getDictionaryDataSelector('528909902031093765').then(res => {
this.deliveryModelOptions = res.data.list
})
},
getmodeTransportOptions() {
getDictionaryDataSelector('528911662179155973').then(res => {
this.modeTransportOptions = res.data.list
})
},
getcostBearingMianOptions() {
getDictionaryDataSelector('528912119651893253').then(res => {
this.costBearingMianOptions = res.data.list
})
},
getpricingModelOptions() {
getDictionaryDataSelector('528918479743483909').then(res => {
this.pricingModelOptions = res.data.list
})
},
getcontractLabelOptions() {
getDictionaryDataSelector('529252201021833285').then(res => {
this.contractLabelOptions = res.data.list
})
},
contractlpriceformula() {
let table = this.dataForm.contractLPriceFormulaList
let summaryField = []
let summaryFieldName = {}
let data = {}
let thousandsField = []
for (let i in summaryField) {
let map = {}
let val = 0
for (let j = 0; j < table.length; j++) {
let summary = table[j][summaryField[i]];
if (summary) {
let data = isNaN(summary) ? 0 : Number(summary)
val += data
}
}
map.id = summaryField[i];
map.name = summaryFieldName[summaryField[i]];
map.val = (thousandsField.includes(summaryField[i])) ? Number(val).toLocaleString('zh', {
maximumFractionDigits: '2'
}) : val;
data[summaryField[i]] = map;
}
return data;
},
getcontractlpriceformulapriceFormulaTypeOptions() {
getDictionaryDataSelector('529925559430414341').then(res => {
this.contractlpriceformulapriceFormulaTypeOptions = res.data.list
})
},
contractlcommodity() {
let table = this.dataForm.contractLCommodityList
let summaryField = []
let summaryFieldName = {}
let data = {}
let thousandsField = []
for (let i in summaryField) {
let map = {}
let val = 0
for (let j = 0; j < table.length; j++) {
let summary = table[j][summaryField[i]];
if (summary) {
let data = isNaN(summary) ? 0 : Number(summary)
val += data
}
}
map.id = summaryField[i];
map.name = summaryFieldName[summaryField[i]];
map.val = (thousandsField.includes(summaryField[i])) ? Number(val).toLocaleString('zh', {
maximumFractionDigits: '2'
}) : val;
data[summaryField[i]] = map;
}
return data;
},
contractLFeeClause() {
let table = this.dataForm.contractLFeeClauseList
let summaryField = []
let summaryFieldName = {}
let data = {}
let thousandsField = []
for (let i in summaryField) {
let map = {}
let val = 0
for (let j = 0; j < table.length; j++) {
let summary = table[j][summaryField[i]];
if (summary) {
let data = isNaN(summary) ? 0 : Number(summary)
val += data
}
}
map.id = summaryField[i];
map.name = summaryFieldName[summaryField[i]];
map.val = (thousandsField.includes(summaryField[i])) ? Number(val).toLocaleString('zh', {
maximumFractionDigits: '2'
}) : val;
data[summaryField[i]] = map;
}
return data;
},
getcontractLFeeClausefeeTypeOptions() {
getDictionaryDataSelector('528957381233606661').then(res => {
this.contractLFeeClausefeeTypeOptions = res.data.list
})
},
contractlpayment() {
let table = this.dataForm.contractLPaymentList
let summaryField = []
let summaryFieldName = {}
let data = {}
let thousandsField = []
for (let i in summaryField) {
let map = {}
let val = 0
for (let j = 0; j < table.length; j++) {
let summary = table[j][summaryField[i]];
if (summary) {
let data = isNaN(summary) ? 0 : Number(summary)
val += data
}
}
map.id = summaryField[i];
map.name = summaryFieldName[summaryField[i]];
map.val = (thousandsField.includes(summaryField[i])) ? Number(val).toLocaleString('zh', {
maximumFractionDigits: '2'
}) : val;
data[summaryField[i]] = map;
}
return data;
},
getcontractlpaymentpaymentNodeOptions() {
getDictionaryDataSelector('529219891287294021').then(res => {
this.contractlpaymentpaymentNodeOptions = res.data.list
})
},
getcontractlpaymentpaymentMethodOptions() {
getDictionaryDataSelector('529220245760507973').then(res => {
this.contractlpaymentpaymentMethodOptions = res.data.list
})
},
initData() {
this.$nextTick(function() {
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/scm/ContractL/' + this.dataForm.id,
method: 'get',
}).then(res => {
this.dataInfo(res.data)
this.loading = false
})
} else {
this.initDefaultData()
}
})
},
beforeSubmit() {
const _data = this.dataList()
return _data
},
initDefaultData() {
if (this.userInfo.organizeIdList instanceof Array && this.userInfo.organizeIdList.length > 0) {
this.dataForm.deptId = this.userInfo.organizeIdList
}
},
selfInit() {
this.$store.commit('base/UPDATE_RELATION_DATA', {})
this.dataAll()
this.initDefaultData()
this.collapse()
},
selfGetInfo(dataForm) {
this.dataForm.id = this.dataForm.id
this.dataInfo(dataForm)
},
addcontractlpriceformulaList() {
let value = {}
this.tableKey = 'contractLPriceFormulaList';
this.getcontractlpriceformulaList(value)
this.childIndex = -1
this.collapse()
},
delcontractlpriceformulaList(index) {
var that = this
uni.showModal({
title: '提示',
content: '确认删除该条信息吗?',
success: function(res) {
if (res.confirm) {
that.dataForm.contractLPriceFormulaList.splice(index, 1);
that.collapse()
}
}
})
},
getcontractlpriceformulaList(value) {
let item = {
priceFormulaCode: '',
priceFormulaType: "",
priceFormulaTypeOptions: [],
fixedProfit1: '',
fixedProfit2: '',
fixedAmount: '',
accountCost: '',
handleCost: '',
reshipmentCost: '',
otherCost1: '',
otherCost2: '',
otherCost3: '',
otherCost4: '',
settlementTonnage: '',
correspondTonnage: '',
saleTonnage: '',
taxRate: '',
taxRateCustomer: '',
taxRateYellowBull: '',
taxRateInvoicingCompany: '',
fundRate: '',
}
let result = {
...item,
...value
}
this.dataForm.contractLPriceFormulaList.push(result)
this.childIndex = this.dataForm.contractLPriceFormulaList.length - 1
this.isEdit = true
this.isEdit = false
},
addcontractlcommodityList() {
let value = {}
this.tableKey = 'contractLCommodityList';
this.getcontractlcommodityList(value)
this.childIndex = -1
this.collapse()
},
delcontractlcommodityList(index) {
var that = this
uni.showModal({
title: '提示',
content: '确认删除该条信息吗?',
success: function(res) {
if (res.confirm) {
that.dataForm.contractLCommodityList.splice(index, 1);
that.collapse()
}
}
})
},
getcontractlcommodityList(value) {
let item = {
productId: "",
commodityCode: '',
commodityName: '',
specifications: '',
inventoryUnitId: '',
procureUnit: "",
number: '',
taxRate: '',
priceRate: '',
totalRate: '',
}
let result = {
...item,
...value
}
this.dataForm.contractLCommodityList.push(result)
this.childIndex = this.dataForm.contractLCommodityList.length - 1
this.isEdit = true
this.isEdit = false
},
addcontractLFeeClauseList() {
let value = {}
this.tableKey = 'contractLFeeClauseList';
this.getcontractLFeeClauseList(value)
this.childIndex = -1
this.collapse()
},
delcontractLFeeClauseList(index) {
var that = this
uni.showModal({
title: '提示',
content: '确认删除该条信息吗?',
success: function(res) {
if (res.confirm) {
that.dataForm.contractLFeeClauseList.splice(index, 1);
that.collapse()
}
}
})
},
getcontractLFeeClauseList(value) {
let item = {
feeType: "",
feeTypeOptions: [],
price: 0,
remark: '',
}
let result = {
...item,
...value
}
this.dataForm.contractLFeeClauseList.push(result)
this.childIndex = this.dataForm.contractLFeeClauseList.length - 1
this.isEdit = true
this.isEdit = false
},
addcontractlpaymentList() {
let value = {}
this.tableKey = 'contractLPaymentList';
this.getcontractlpaymentList(value)
this.childIndex = -1
this.collapse()
},
delcontractlpaymentList(index) {
var that = this
uni.showModal({
title: '提示',
content: '确认删除该条信息吗?',
success: function(res) {
if (res.confirm) {
that.dataForm.contractLPaymentList.splice(index, 1);
that.collapse()
}
}
})
},
getcontractlpaymentList(value) {
let item = {
paymentNode: "",
paymentNodeOptions: [],
paymentMethod: "",
paymentMethodOptions: [],
paymentRatio: 0,
price: 0,
remark: '',
}
let result = {
...item,
...value
}
this.dataForm.contractLPaymentList.push(result)
this.childIndex = this.dataForm.contractLPaymentList.length - 1
this.isEdit = true
this.isEdit = false
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.contractLPriceFormulaList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.contractLCommodityList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.contractLFeeClauseList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.contractLPaymentList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
this.collapse()
},
collapse() {
setTimeout(() => {}, 1000);
},
},
}
</script>
<style>
page {
background-color: #f0f2f6;
}
</style>