| | |
| | | <!-- <u-notify :message="accountMsg" :show="trueMsg" :type="accountMsgType"></u-notify> --> |
| | | <!-- <u-alert :title="accountMsg" :type="accountMsgType" :description="accountMsgType"></u-alert> --> |
| | | <view class="formDataContaniner"> |
| | | <u--form labelPosition="left" :model="newFormData" :rules="rules" ref="formRef"> |
| | | <u-form-item labelWidth="20%" label="结算客户" prop="customerName" borderBottom ref="customerNameRef"> |
| | | <u--form labelPosition="left" :model="newFormData" ref="formRef"> |
| | | <u-form-item labelWidth="20%" label="结算客户" borderBottom ref="customerNameRef"> |
| | | <u--input v-model="newFormData.customerName" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item labelWidth="20%" label="合同编号" prop="contractNum" borderBottom ref="contractNumRef"> |
| | | <u-form-item labelWidth="20%" label="合同编号" borderBottom ref="contractNumRef"> |
| | | <u--input v-model="newFormData.contractNum" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item labelWidth="20%" label="合同名称" borderBottom ref="contractNameRef"> |
| | | <u--input disabled disabledColor="#ffffff" v-model="newFormData.contractName" border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item labelWidth="20%" label="付款方式" borderBottom ref="payTypeRef"> |
| | | <u--input :value="newFormData.payType == '0' ? '现汇':'承兑'" disabled disabledColor="#ffffff" placeholder="请选择付款方式" border="none"></u--input> |
| | | <u--input :value="newFormData.payType == '0' ? '现汇':'承兑'" disabled disabledColor="#ffffff" |
| | | placeholder="请选择付款方式" border="none"></u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item @click="timeShow = true" prop="startDate" labelWidth="20%" label="日期" borderBottom ref="timeDataRef"> |
| | | <u-form-item @click="timeShow = true" labelWidth="20%" label="日期" borderBottom |
| | | ref="timeDataRef"> |
| | | <u--input v-model="timeDataStr" border="none" placeholder="请选择范围日期"></u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item labelWidth="20%" label="编号" borderBottom> |
| | | <u--input border="none" disabled disabledColor="#ffffff" value="自动生成" placeholder="请输入编号"></u--input> |
| | | <u--input border="none" disabled disabledColor="#ffffff" v-model="newFormData.number" placeholder="请输入编号"></u--input> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | | |
| | | <!-- 申请日历、范围时间 --> |
| | | <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" :maxDate="maxDate"></u-calendar> |
| | | <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" |
| | | :maxDate="maxDate"></u-calendar> |
| | | <!-- 申请付款方式弹出菜单 --> |
| | | <!-- <u-action-sheet :show="showPayType" :actions="actions" title="请选择付款方式" @close="showPayType = false" @select="sexSelect"></u-action-sheet> --> |
| | | |
| | |
| | | --> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 添加合同子项 --> |
| | | <view class="addContractContainer"> |
| | | <u-popup :show="addContractShow" @close="addContractClose" @open="addContractOpen" mode="bottom" round="22"> |
| | |
| | | <u--form labelPosition="left" :model="addContractFormdata" :rules="addContractRules" ref="form1"> |
| | | <view class="formUpCard"> |
| | | <u-form-item label="矿厂" labelWidth="20%" ref="item1"> |
| | | <u--input v-model="addContractFormdata.filedName" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="addContractFormdata.filedName" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item @click="coalFiledSelectShow = true" label="煤厂" labelWidth="20%" ref="item1"> |
| | | <u--input v-model="addContractFormdata.compName" disabled disabledColor="#ffffff"></u--input> |
| | |
| | | <view class="currentPriceBox"> |
| | | <u--form :model="currentCoal" labelPosition="left"> |
| | | <u-form-item label="煤种" labelWidth="35%"> |
| | | <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item :label="currentCoal.type == 1 ? '钢厂长协' : '基准价'" labelWidth="35%"> |
| | | <u--input v-model="currentCoal.steelMillPrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="currentCoal.steelMillPrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item :label="currentCoal.type == 1 ? '焦化长协' : '电厂基准'" labelWidth="35%"> |
| | | <u--input v-model="currentCoal.cokingPrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="currentCoal.cokingPrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item :label="currentCoal.type == 1 ? '非长协' : '区域外电厂价'" labelWidth="35%"> |
| | | <u--input v-model="currentCoal.noImportantPrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="currentCoal.noImportantPrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="挂牌价" labelWidth="35%"> |
| | | <u--input v-model="currentCoal.quotePrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="currentCoal.quotePrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | |
| | | <view class="selectPricebox"> |
| | | <u--form labelPosition="left"> |
| | | <u-form-item label="煤种" labelWidth="35%"> |
| | | <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-radio-group v-model="addContractFormdata.priceMode" placement="column" @change="groupChange"> |
| | | <u-radio-group v-model="addContractFormdata.priceMode" placement="column" |
| | | @change="groupChange"> |
| | | <view class="selectPriceboxItem"> |
| | | <u-form-item :label="currentCoal.type == 1 ? '钢厂长协' : '基准价'" labelWidth="35%"> |
| | | <u--input v-model="afterPrice.steelMillPrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="afterPrice.steelMillPrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="0" @change="changePriceMode"></u-radio> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="0" |
| | | @change="changePriceMode"></u-radio> |
| | | </view> |
| | | <view class="selectPriceboxItem"> |
| | | <u-form-item :label="currentCoal.type == 1 ? '焦化长协' : '电厂基准'" labelWidth="35%"> |
| | | <u--input v-model="afterPrice.cokingPrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="afterPrice.cokingPrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="1" @change="changePriceMode"></u-radio> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="1" |
| | | @change="changePriceMode"></u-radio> |
| | | </view> |
| | | <view class="selectPriceboxItem"> |
| | | <u-form-item :label="currentCoal.type == 1 ? '非长协' : '区域外电厂价'" labelWidth="35%"> |
| | | <u--input v-model="afterPrice.noImportantPrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="afterPrice.noImportantPrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="2" @change="changePriceMode"></u-radio> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="2" |
| | | @change="changePriceMode"></u-radio> |
| | | </view> |
| | | <view class="selectPriceboxItem"> |
| | | <u-form-item label="挂牌价" labelWidth="35%"> |
| | | <u--input v-model="afterPrice.quotePrice" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="afterPrice.quotePrice" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="3" @change="changePriceMode"></u-radio> |
| | | <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="3" |
| | | @change="changePriceMode"></u-radio> |
| | | </view> |
| | | </u-radio-group> |
| | | </u--form> |
| | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <u-form-item @click="addContractTransportShow = true" label="运输" labelWidth="20%" ref="item1"><u--input v-model="addContractTransport"></u--input></u-form-item> |
| | | <u-form-item @click="addContractTransportShow = true" label="运输" labelWidth="20%" ref="item1"> |
| | | <u--input v-model="addContractTransport"></u--input> |
| | | </u-form-item> |
| | | </view> |
| | | <view class="formDownCard"> |
| | | <u-form-item label="单价" labelWidth="20%" ref="item1"> |
| | | <u--input v-model="addContractFormdata.price" disabled disabledColor="#ffffff" border="none"></u--input> |
| | | <u--input v-model="addContractFormdata.price" disabled disabledColor="#ffffff" |
| | | border="none"></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="订单金额" labelWidth="20%" ref="item1"><u--input :disabled="addContractFormdata.trainType == 2" v-show="currentRowComputed" v-model="addContractFormdata.amount"></u--input></u-form-item> |
| | | <u-form-item label="订单金额" labelWidth="20%" ref="item1"> |
| | | <u--input :disabled="addContractFormdata.trainType == 2" v-show="currentRowComputed" |
| | | v-model="addContractFormdata.amount"></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="订单数量" labelWidth="20%" ref="item1"> |
| | | <u--input :disabled="addContractFormdata.trainType == 1" @input="jisuanAmount" v-model="addContractFormdata.quant"></u--input> |
| | | <u--input :disabled="addContractFormdata.trainType == 1" @input="jisuanAmount" |
| | | v-model="addContractFormdata.quant"></u--input> |
| | | </u-form-item> |
| | | </view> |
| | | |
| | |
| | | <u-form-item label="抑尘费" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost2" border="none"></u--input></u-form-item> --> |
| | | </u--form> |
| | | |
| | | <view class="addContractConfirm"><u-button text="添加" type="primary" @click="addContractSanConfirm"></u-button></view> |
| | | <view class="addContractConfirm"> |
| | | <u-button text="添加" type="primary" @click="addContractSanConfirm"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 选择煤厂 --> |
| | | <view class="coalFiledSelectPopup"> |
| | | <u-popup :show="coalFiledSelectShow" @close="coalFiledSelectClose" @open="coalFiledSelectOpen" mode="bottom" round="22"> |
| | | <u-popup :show="coalFiledSelectShow" @close="coalFiledSelectClose" @open="coalFiledSelectOpen" mode="bottom" |
| | | round="22"> |
| | | <scroll-view scroll-y="true" style="height:100%;"> |
| | | <combination-title class="selectCustomerTitle" title="选择煤厂"></combination-title> |
| | | <view class="coalFiledSelectSearch"></view> |
| | |
| | | |
| | | <view class="TableUtilBtn"> |
| | | <uni-table border emptyText="暂无更多数据"> |
| | | <uni-tr><uni-th align="center">操作</uni-th></uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="center">操作</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in coalfiledData" :key="index"> |
| | | <uni-td align="center"> |
| | | <!-- 选择合同 --> |
| | | <view class="TableUtilBtnContainer"><u-button type="primary" @click="coalFiledSelectClick(item)" icon="checkbox-mark" size="mini"></u-button></view> |
| | | <view class="TableUtilBtnContainer"> |
| | | <u-button type="primary" @click="coalFiledSelectClick(item)" icon="checkbox-mark" |
| | | size="mini"></u-button> |
| | | </view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | |
| | | |
| | | <!-- 选择收货人 --> |
| | | <view class="selectCustomerPopup"> |
| | | <u-popup :show="addContractConsigneeShow" @close="addContractConsigneeClose" @open="addContractConsigneeOpen" mode="bottom" round="22"> |
| | | <u-popup :show="addContractConsigneeShow" @close="addContractConsigneeClose" |
| | | @open="addContractConsigneeOpen" mode="bottom" round="22"> |
| | | <scroll-view scroll-y="true" style="height:100%;"> |
| | | <combination-title class="selectCustomerTitle" title="选择收货人"></combination-title> |
| | | <view class="selectCustomerContainer"> |
| | | <view class="searchContainer"> |
| | | <u--form labelPosition="left" :model="searchCustomerForm" ref="selectformRef"> |
| | | <u-form-item labelWidth="12%" label="单位" borderBottom ref="compRef"> |
| | | <u--input @focus="selectCustomerCompShow = true" v-model="searchCustomerForm.compName" placeholder="点击选择单位" border="none"></u--input> |
| | | <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.compName != ''" @click="searchCustomerForm.compName = ''"></u-icon> |
| | | <u--input @focus="selectCustomerCompShow = true" v-model="searchCustomerForm.compName" |
| | | placeholder="点击选择单位" border="none"></u--input> |
| | | <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.compName != ''" |
| | | @click="searchCustomerForm.compName = ''"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item labelWidth="20%" label="客户名称" borderBottom ref="timeDataRef"> |
| | | <u--input v-model="selectCustomerData.customerName" border="none" placeholder="输入客户名称"></u--input> |
| | | <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerName != ''" @click="selectCustomerData.customerName = ''"></u-icon> |
| | | <u--input v-model="selectCustomerData.customerName" border="none" |
| | | placeholder="输入客户名称"></u--input> |
| | | <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerName != ''" |
| | | @click="selectCustomerData.customerName = ''"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item labelWidth="20%" label="客户级别" borderBottom> |
| | | <u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText" placeholder="点击选择级别"></u--input> |
| | | <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.levelText != ''" @click="searchCustomerForm.levelText = ''"></u-icon> |
| | | <u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText" |
| | | placeholder="点击选择级别"></u--input> |
| | | <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.levelText != ''" |
| | | @click="searchCustomerForm.levelText = ''"></u-icon> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | |
| | | <view class="searchResultList"> |
| | | <u-cell-group :right-icon="false"> |
| | | <u-cell v-for="(item, index) in customerData" :title="item.customerFullName" :arrow="false"> |
| | | <text slot="value" class="u-slot-value"> |
| | | <view slot="value" class="u-slot-value"> |
| | | <button |
| | | class="mini-btn" |
| | | type="default" |
| | |
| | | > |
| | | 选择 |
| | | </button> |
| | | </text> |
| | | </view> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | </view> |
| | | <view class="loadmoreClass"> |
| | | <u-loadmore loadmoreText="点击加载更多" nomoreText="无更多数据!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px"/> |
| | | <u-loadmore loadmoreText="点击加载更多" nomoreText="无更多数据!!!" :status="status" @loadmore="loadingCustomer" |
| | | fontSize="20" height="30px"/> |
| | | </view> |
| | | <!-- 选择用户菜单项 --> |
| | | <view class="selectCustomerCompSheet"> |
| | |
| | | </view> |
| | | <!-- 级别菜单项 --> |
| | | <view class="selectLevelSheet"> |
| | | <u-action-sheet :show="selectLevelShow" :actions="levelList" title="请选择级别" @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet> |
| | | <u-action-sheet :show="selectLevelShow" :actions="levelList" title="请选择级别" |
| | | @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> --> |
| | | <view class="balanceNo" v-if="accountDetails.balanceTotal < 0"><text style="color:red;">客户账户当前处于欠款状态</text></view> |
| | | <view class="balanceNo" v-if="accountDetails.balanceTotal < 0"> |
| | | <text style="color:red;">客户账户当前处于欠款状态</text> |
| | | </view> |
| | | |
| | | <view class="messageCustomerBalance" v-if="accountDetails.balanceTotal >= 0"> |
| | | <text style="color: #FFA500;;">客户账户现汇余额:{{ accountDetails.balanceTotal }},承兑余额:{{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text> |
| | | <text style="color: #FFA500;;">客户账户现汇余额:{{ |
| | | accountDetails.balanceTotal |
| | | }},承兑余额:{{ accountDetails.balance2 == null ? 0 : customerChengdui }} |
| | | </text> |
| | | </view> |
| | | <u-swipe-action> |
| | | <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="item.id"> |
| | | <u-swipe-action-item @click="deleteContractCardClick" :options="options1" |
| | | v-for="(item, index) in newFormData.contractOrders" :key="index"> |
| | | <view class="cardList"> |
| | | <view class="" class="cardListIcon" @click="editApplicationClick(item,index)"> |
| | | <view class="" class="cardListIcon" @click="editApplicationClick(index)"> |
| | | <u-icon name="edit-pen" color="#2979ff" size="35"></u-icon> |
| | | </view> |
| | | <view class="cardList-container"> |
| | |
| | | </u-swipe-action> |
| | | |
| | | <view class="addCard" @click="addContractClick"> |
| | | <view class="addCard-icon"><u-icon name="plus" size="100"></u-icon></view> |
| | | <view class="addCard-icon"> |
| | | <u-icon name="plus" size="100"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | applicationOrderIndex:null, |
| | | |
| | | tdStyle: 'max-height: 30px;overflow: scroll;', |
| | | spanStyle: 'overflow:auto', |
| | | newFormData: { |
| | | amount: null, |
| | | coalId: '', |
| | | coalName: '', |
| | | contractId: 169, |
| | | contractName: '', |
| | | contractNum: '', |
| | | contractOrders: [], |
| | | customerAddressId: '', |
| | | customerId: 236, |
| | | customerName: '', |
| | | endDate: '', |
| | | executiveQuant: null, |
| | | id: null, |
| | | number: '', |
| | | payType: '', |
| | | price: null, |
| | | quant: null, |
| | | remark: '', |
| | | startDate: '', |
| | | type: '外销' |
| | | // amount: null, |
| | | // coalId: '', |
| | | // coalName: '', |
| | | // contractId: 169, |
| | | // contractName: '', |
| | | // contractNum: '', |
| | | // contractOrders: [], |
| | | // customerAddressId: '', |
| | | // customerId: 236, |
| | | // customerName: '', |
| | | // endDate: '', |
| | | // executiveQuant: null, |
| | | // id: null, |
| | | // number: '', |
| | | // payType: '', |
| | | // price: null, |
| | | // quant: null, |
| | | // remark: '', |
| | | // startDate: '', |
| | | // type: '外销' |
| | | }, |
| | | accountDetails: {}, |
| | | // 时间 |
| | |
| | | actions: [], |
| | | selectValue: '', |
| | | rules: { |
| | | customerName: [ |
| | | { |
| | | required: true, |
| | | message: '请选择结算客户', |
| | | trigger: ['blur', 'change'] |
| | | } |
| | | ], |
| | | contractNum: [ |
| | | { |
| | | required: true, |
| | | message: '请选择合同编号', |
| | | trigger: ['blur', 'change'] |
| | | } |
| | | ], |
| | | payType: [ |
| | | { |
| | | required: true, |
| | | message: '请选择付款方式', |
| | | trigger: ['blur', 'change'] |
| | | } |
| | | ], |
| | | startDate: [ |
| | | { |
| | | required: true, |
| | | message: '请选择时间', |
| | | trigger: ['blur', 'change'] |
| | | } |
| | | ] |
| | | // customerName: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请选择结算客户', |
| | | // trigger: ['blur', 'change'] |
| | | // } |
| | | // ], |
| | | // contractNum: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请选择合同编号', |
| | | // trigger: ['blur', 'change'] |
| | | // } |
| | | // ], |
| | | // payType: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请选择付款方式', |
| | | // trigger: ['blur', 'change'] |
| | | // } |
| | | // ], |
| | | // startDate: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请选择时间', |
| | | // trigger: ['blur', 'change'] |
| | | // } |
| | | // ] |
| | | }, |
| | | // 时间 |
| | | timeShow: false, |
| | |
| | | selectCustomerActions: [], |
| | | // 级别 |
| | | selectLevelShow: false, |
| | | levelList: [{ name: '一星级', value: 'A' }, { name: '二星级', value: 'B' }, { name: '三星级', value: 'C' }, { name: '四星级', value: 'D' }, { name: '五星级', value: 'E' }], |
| | | levelList: [{name: '一星级', value: 'A'}, {name: '二星级', value: 'B'}, {name: '三星级', value: 'C'}, { |
| | | name: '四星级', |
| | | value: 'D' |
| | | }, {name: '五星级', value: 'E'}], |
| | | // 选择合同 |
| | | // selectContractShow: false, |
| | | // searchContractForm: { |
| | |
| | | // 添加合同 |
| | | addContractShow: false, |
| | | // 添加合同表单 |
| | | addContractRules: {}, |
| | | addContractRules: { |
| | | // compName: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请选择煤厂', |
| | | // trigger: ['blur', 'change'] |
| | | // } |
| | | // ], |
| | | |
| | | }, |
| | | addContractFormdata: { |
| | | amount: null, |
| | | coalId: null, |
| | | coalName: '', |
| | | compId: null, |
| | | compName: '', |
| | | cost1: '', |
| | | cost2: '', |
| | | customerId: null, |
| | | customerName: '', |
| | | edit: true, |
| | | favouredpolicyIds: '', |
| | | filedId: null, |
| | | filedName: '', |
| | | fromStation: '', |
| | | modifyId: null, |
| | | modifyInfoId: null, |
| | | customerAddressId: null, |
| | | price: null, |
| | | priceMode: '0', |
| | | quant: '', |
| | | toStation: '', |
| | | trainType: 1, |
| | | type: '' |
| | | // id:null, |
| | | // amount: null, |
| | | // coalId: null, |
| | | // coalName: '', |
| | | // compId: null, |
| | | // compName: '', |
| | | // cost1: '', |
| | | // cost2: '', |
| | | // customerId: null, |
| | | // customerName: '', |
| | | // edit: true, |
| | | // favouredpolicyIds: '', |
| | | // filedId: null, |
| | | // filedName: '', |
| | | // fromStation: '', |
| | | // modifyId: null, |
| | | // modifyInfoId: null, |
| | | // customerAddressId: null, |
| | | // price: null, |
| | | // priceMode: '', |
| | | // quant: '', |
| | | // toStation: '', |
| | | // trainType: 1, |
| | | // type: '' |
| | | |
| | | }, |
| | | contractDetails: [], // 选择的合同详情 |
| | |
| | | }, |
| | | computed: { |
| | | afterPrice() { |
| | | let temp = { |
| | | coalName: "", |
| | | cokingPrice: 0, |
| | | modifyId: 0, |
| | | modifyInfoId: 0, |
| | | noImportantPrice: 0, |
| | | quotePrice: 0, |
| | | steelMillPrice: 0, |
| | | type: null |
| | | } |
| | | temp = Object.assign({},this.currentCoal); |
| | | // temp.coalName = this.currentCoal.coalName |
| | | // temp.cokingPrice = this.currentCoal.cokingPrice |
| | | // temp.modifyId = this.currentCoal.modifyId |
| | | // temp.modifyInfoId = this.currentCoal.modifyInfoId |
| | | // temp.noImportantPrice = this.currentCoal.noImportantPrice |
| | | // temp.quotePrice = this.currentCoal.quotePrice |
| | | // temp.steelMillPrice = this.currentCoal.steelMillPrice |
| | | // temp.type = this.currentCoal.type |
| | | |
| | | let temp = Object.assign({},this.currentCoal); |
| | | let favouredpolicyIds = ''; |
| | | if (this.favouredpolicyList.length > 0) { |
| | | console.log('变后的价格',this.multipleSelection,temp,this.currentCoal); |
| | | this.multipleSelection.forEach(e => { |
| | | if (favouredpolicyIds.length > 0) { |
| | | favouredpolicyIds += ','; |
| | |
| | | this.addContractFormdata.favouredpolicyIds = favouredpolicyIds; |
| | | } |
| | | } |
| | | console.log(temp,'after-------temp') |
| | | return temp; |
| | | }, |
| | | showPrice() { |
| | |
| | | return true; |
| | | }, |
| | | async currentRowComputed() { |
| | | // return true |
| | | console.log('currentRowComputed-------------进来',this.addContractFormdata,'this.addContractFormdata-----'); |
| | | |
| | | //变价格用的 |
| | | this.changePriceMode(this.addContractFormdata.priceMode); |
| | | |
| | | //变订单量 |
| | | if (this.addContractFormdata.id != null) { |
| | | if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) { |
| | | let price = this.addContractFormdata.price; |
| | | if (this.addContractFormdata.trainType == 1) { |
| | | console.log('地销'); |
| | | let q = this.addContractFormdata.amount / price; |
| | | this.addContractFormdata.quant = q.toFixed(2); |
| | | this.addContractFormdata.cost1 = null; //运费 |
| | | this.addContractFormdata.cost2 = null; //抑尘费 |
| | | } else if (this.addContractFormdata.trainType == 2&& (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) { |
| | | console.log('路运',this.addContractFormdata,'this.addContractFormdata-----'); |
| | | } else if (this.addContractFormdata.trainType == 2) { |
| | | //如果路运价格增加抑尘费和运费 |
| | | let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //路运运费 |
| | | price += cost1Price; |
| | |
| | | |
| | | let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2); |
| | | this.addContractFormdata.amount = amount.toFixed(2); |
| | | |
| | | } |
| | | } |
| | | } else { |
| | | this.addContractFormdata.quant = null; |
| | | } |
| | | // if (this.currentRow.quant > 0 && this.currentRow.price > 0) { |
| | | // this.currentRow.amount = this.currentRow.quant * this.currentRow.price; |
| | | // return true; |
| | | // } |
| | | return true; |
| | | } |
| | | // accountMsg() { |
| | |
| | | }, |
| | | methods: { |
| | | async jisuanAmount() { |
| | | console.log('进入计算'); |
| | | if (this.addContractFormdata.trainType == 2) { |
| | | let price = this.addContractFormdata.price; |
| | | //如果路运价格增加抑尘费和运费 |
| | |
| | | this.getFavouredPolicyItem(); |
| | | this.editApplicationFormData(); // 修改申请表单详情 |
| | | }, |
| | | editApplicationFormData(){ |
| | | this.$reqGet('formData',{},this.editApplicationTableId).then(res=>{ |
| | | // 初始化申请表单 |
| | | async editApplicationFormData() { |
| | | uni.showLoading({ |
| | | title:'加载中...' |
| | | }) |
| | | // 通过申请id获取表单 |
| | | await this.$reqGet('formData', {}, this.editApplicationTableId).then(res => { |
| | | uni.hideLoading(); |
| | | console.log('整体详情', res.data); |
| | | this.newFormData = res.data; |
| | | console.log(this.newFormData.contractOrders,'初始化列表-----------newFormData----------初始化') |
| | | this.timeDataStr = this.newFormData.startDate; |
| | | }) |
| | | |
| | | // 获取合同详情,煤种 |
| | | await this.getContractDetails(); |
| | | |
| | | // 初始化当前申请客户账户情况 |
| | | if(this.newFormData.customerId){ |
| | | await this.$reqGet('getAccount', {customerId: this.newFormData.customerId}).then(res => { |
| | | this.accountDetails = res.data; |
| | | }); |
| | | } |
| | | }, |
| | | editApplicationClick(item,index){ |
| | | console.log(item,'item=========') |
| | | editApplicationClick(index) { |
| | | this.applicationOrderIndex = index;// 待修改订单index |
| | | this.addContractFormdata = item; |
| | | console.log(this.addContractFormdata,'this.addContractFormdata=============点击进来的某列') |
| | | this.addContractFormdata.priceMode = item.priceMode.toString(); |
| | | this.addContractFormdata = Object.assign({},this.newFormData.contractOrders[index]); |
| | | console.log('修改指定订单表单----------',this.addContractFormdata.id,this.addContractFormdata); |
| | | this.addContractFormdata.priceMode = this.newFormData.contractOrders[this.applicationOrderIndex].priceMode.toString(); |
| | | // 修改订单优惠初始化 |
| | | if(item.favouredpolicyIds){ |
| | | item.favouredpolicyIds.split(',').map(e=>{ |
| | | this.selectOKfavouredpolicyValue.push(Number(e)); |
| | | if (this.newFormData.contractOrders[index].favouredpolicyIds) { |
| | | this.newFormData.contractOrders[index].favouredpolicyIds.split(',').map(item => { |
| | | this.selectOKfavouredpolicyValue.push(Number(item)); |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 获取价格 |
| | | // this.getNewPriceData = this.addContractFormdata; |
| | | this.getNewPriceData.type = this.newFormData.type; |
| | | this.getNewPriceData.customerAddressName = this.addContractFormdata.customerFullName; |
| | | this.getNewPriceData.customerAddressId = this.addContractFormdata.id; |
| | | this.getNewPriceData.toStation = this.addContractFormdata.toStation; |
| | | this.getNewPriceData.coalId = this.addContractFormdata.coalId; |
| | | this.getNewPriceData.coalName =this.addContractFormdata.coalName; |
| | | this.getNewPriceData.compName = this.newFormData.contractOrders[this.applicationOrderIndex].compName; |
| | | this.getNewPriceData.traninType = this.newFormData.contractOrders[this.applicationOrderIndex].traninType; |
| | | this.getNewPriceData.compId = this.newFormData.contractOrders[this.applicationOrderIndex].compId; |
| | | this.getNewPriceData.fromStation = this.newFormData.contractOrders[this.applicationOrderIndex].fromStation; |
| | | this.getNewPriceData.toStation = this.newFormData.contractOrders[this.applicationOrderIndex].toStation; |
| | | this.getNewPriceData.filedId = this.newFormData.contractOrders[this.applicationOrderIndex].filedId; |
| | | this.getNewPriceData.filedName = this.newFormData.contractOrders[this.applicationOrderIndex].filedName; |
| | | this.getNewPriceData.customerAddressName = this.newFormData.contractOrders[this.applicationOrderIndex].customerAddressName; |
| | | this.getNewPriceData.customerAddressId = this.newFormData.contractOrders[this.applicationOrderIndex].customerAddressId; |
| | | this.getNewPriceData.toStation = this.newFormData.contractOrders[this.applicationOrderIndex].toStation; |
| | | this.getNewPriceData.coalId = this.newFormData.contractOrders[this.applicationOrderIndex].coalId; |
| | | this.getNewPriceData.coalName = this.newFormData.contractOrders[this.applicationOrderIndex].coalName; |
| | | // 获取合同煤种价格 |
| | | this.getNewPrice(); |
| | | |
| | |
| | | break; |
| | | } |
| | | |
| | | // 获取合同详情,煤种 |
| | | this.getContractDetails(); |
| | | |
| | | this.changePriceMode(this.addContractFormdata.priceMode); |
| | | |
| | | this.$nextTick(()=>{ |
| | | this.addContractShow = true; |
| | |
| | | // 添加订单按钮 |
| | | addContractClick() { |
| | | // 打印true或false |
| | | this.$refs.formRef |
| | | .validate() |
| | | .then(res => { |
| | | // this.$refs.formRef |
| | | // .validate() |
| | | // .then(res => { |
| | | if (this.accountDetails.balanceType == '贷') { |
| | | uni.showToast({ |
| | | title: '客户账户余额当前处于欠款状态!', |
| | |
| | | // 获取合同详情,煤种 |
| | | this.getContractDetails(); |
| | | |
| | | // console.log('this.addContractFormdata',this.addContractFormdata); |
| | | this.multipleSelection = []; |
| | | } |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | uni.$u.toast('效验失败'); |
| | | }); |
| | | // }) |
| | | // .catch(err => { |
| | | // uni.$u.toast('效验失败'); |
| | | // }); |
| | | }, |
| | | // 添加合同弹出框 |
| | | addContractClose() { |
| | | this.addContractFormdata = {}; |
| | | this.addContractShow = false; |
| | | this.addContractFormdata = {}; |
| | | this.applicationOrderIndex = null; |
| | | }, |
| | | addContractOpen() { |
| | | console.log('添加申请子项窗口打开this.addContractFormdata',this.addContractFormdata); |
| | | // console.log('添加订单打开'); |
| | | console.log('添加订单打开'); |
| | | }, |
| | | // 选择煤厂 |
| | | coalFiledSelectOpen(e) { |
| | |
| | | |
| | | this.addContractFormdata.price = data.steelMillPrice; |
| | | this.addContractFormdata.modifyId = data.modifyId; |
| | | this.addContractFormdata.id = data.id; |
| | | // this.addContractFormdata.id = data.id; |
| | | } else { |
| | | uni.$u.toast('煤种价格未设置'); |
| | | } |
| | |
| | | // console.log('单选框小组', e); |
| | | }, |
| | | changePriceMode(e) { |
| | | console.log(e,'e==========') |
| | | console.log(this.currentCoal,'this.currentCoal==========') |
| | | if (!this.currentCoal) return; |
| | | if(e){ |
| | | this.addContractFormdata.priceMode = e; |
| | | } |
| | | |
| | | this.addContractFormdata.price = this.afterPrice.quotePrice; |
| | | console.log(this.addContractFormdata.price,'this.currentCoal.price=====afterPrice333333333333') |
| | | switch (this.addContractFormdata.priceMode) { |
| | | case '0': |
| | | console.log('价格',this.afterPrice.steelMillPrice); |
| | | this.addContractFormdata.price = this.currentCoal.steelMillPrice; |
| | | this.addContractFormdata.price = this.afterPrice.steelMillPrice; |
| | | break; |
| | | case '1': |
| | | this.addContractFormdata.price = this.currentCoal.cokingPrice; |
| | | this.addContractFormdata.price = this.afterPrice.cokingPrice; |
| | | break; |
| | | case '2': |
| | | this.addContractFormdata.price = this.currentCoal.noImportantPrice; |
| | | this.addContractFormdata.price = this.afterPrice.noImportantPrice; |
| | | break; |
| | | case '3': |
| | | this.addContractFormdata.price = this.currentCoal.quotePrice; |
| | | console.log('进入单选框',this.currentCoal,'this.addContractFormdata===444'); |
| | | this.addContractFormdata.price = this.afterPrice.quotePrice; |
| | | break; |
| | | } |
| | | }, |
| | |
| | | this.applicationOrderIndex = null; // 初始化修改订单index |
| | | this.$u.toast('修改成功'); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | uni.$u.toast('请规范输入所有信息'); |
| | | } |
| | |
| | | // }, |
| | | // 新建发运申请 |
| | | newApplicationFormDataClick() { |
| | | this.$refs.formRef |
| | | .validate() |
| | | .then(res => { |
| | | console.log('提交申请按钮'); |
| | | // this.$refs.formRef |
| | | // .validate() |
| | | // .then(res => { |
| | | let amount = 0; |
| | | this.newFormData.contractOrders.forEach(e => { |
| | | amount += Number(e.amount); |
| | |
| | | return false; |
| | | }else if (this.accountDetails.balance < amount) { |
| | | let msg = this.accountDetails.balance == null ? 0 : this.accountDetails.balance; |
| | | uni.showToast({ |
| | | title: '客户账户现汇余额不足,现汇余额:' + msg, |
| | | icon: 'error', |
| | | duration: 2000 |
| | | }); |
| | | this.$u.toast('客户账户承兑余额不足,承兑余额:' + msg) |
| | | } else { |
| | | uni.showLoading({ |
| | | title:'加载中...' |
| | | }); |
| | | this.editShenQing(); |
| | | // this.xswaybill(); |
| | | } |
| | |
| | | return false; |
| | | }else if (this.accountDetails.balance2 < amount) { |
| | | let msg = this.accountDetails.balance2 == null ? 0 : this.accountDetails.balance2; |
| | | uni.showToast({ |
| | | title: '客户账户承兑余额不足,承兑余额:' + msg, |
| | | icon: 'error', |
| | | duration: 2000 |
| | | }); |
| | | this.$u.toast('客户账户承兑余额不足,承兑余额:' + msg) |
| | | } else { |
| | | uni.showLoading({ |
| | | title:'加载中...' |
| | | }); |
| | | this.editShenQing(); |
| | | |
| | | // this.xswaybill(); |
| | | } |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | uni.$u.toast('校验失败'); |
| | | }); |
| | | // }) |
| | | // .catch(err => { |
| | | // uni.$u.toast('校验失败'); |
| | | // }); |
| | | }, |
| | | // 修改申请信息 |
| | | editShenQing(){ |
| | | uni.request({ |
| | | url:'/yunxiao/xswaybill', |
| | | url: this.baseUrl + '/yunxiao/xswaybill', |
| | | method:"PUT", |
| | | data:this.newFormData, |
| | | header:{ |
| | | 'TENANT-ID': 5, |
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'), |
| | | VERSION: 'zzl' |
| | | }, |
| | | |
| | | }).then(res=>{ |
| | | // console.log(res); |
| | | if(res.code == 0){ |
| | | uni.showToast({ |
| | | title:'修改成功', |
| | | icon:'success', |
| | | duration:2000 |
| | | }) |
| | | this.$u.toast('修改成功') |
| | | } |
| | | }).then(res => { |
| | | uni.hideLoading(); |
| | | this.$u.toast('修改成功'); |
| | | this.$nextTick(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | // 删除订单卡片 |
| | |
| | | this.newFormData.contractOrders.splice(e, 1); |
| | | }, |
| | | xswaybill() { |
| | | console.log('新建发运申请', this.newFormData); |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }); |
| | | this.$reqPost('xswaybill', this.newFormData).then(res => { |
| | | uni.hideLoading(); |
| | | console.log('新建发运申请', res); |
| | | if (res.code == 0) { |
| | | uni.showToast({ |
| | | title: '添加成功!', |
| | |
| | | .newApplicationTitle { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | // 表单 |
| | | .formDataContaniner { |
| | | .u-form { |
| | | width: 91%; |
| | | margin: 0 auto 0; |
| | | |
| | | .u-form-item { |
| | | .u-form-item__body { |
| | | .u-form-item__body__left { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .u-form-item__body__right { |
| | | .u-form-item__body__right__content { |
| | | .u-form-item__body__right__content__slot { |
| | |
| | | .u-popup { |
| | | .u-transition { |
| | | height: 95%; |
| | | |
| | | .u-popup__content { |
| | | overflow: scroll !important; |
| | | |
| | | .selectCustomerTitle { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .selectCustomerContainer { |
| | | padding: 0 4%; |
| | | // .loadmoreClass{ |
| | |
| | | // } |
| | | .searchContainer { |
| | | } |
| | | |
| | | .searchCustomerBtn { |
| | | margin-top: vww(10); |
| | | display: flex; |
| | | |
| | | .u-button { |
| | | width: 30%; |
| | | } |
| | | } |
| | | |
| | | // 数据列表 |
| | | .searchResultList { |
| | | margin-top: vww(16); |
| | |
| | | margin-top: vww(30); |
| | | display: flex; |
| | | justify-content: center; |
| | | |
| | | .uni-table-scroll { |
| | | min-width: 0 !important; |
| | | |
| | | .uni-table { |
| | | .uni-table-tr { |
| | | padding: 0; |
| | | font-size: vww(13); |
| | | |
| | | .uni-table-th { |
| | | width: vww(100); |
| | | height: vww(32); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .tableBody { |
| | | width: 80%; |
| | | } |
| | | |
| | | .TableUtilBtn { |
| | | width: 20%; |
| | | overflow: hidden; |
| | | |
| | | .uni-table { |
| | | min-width: 0 !important; |
| | | } |
| | | |
| | | .TableUtilBtnContainer { |
| | | .u-button { |
| | | width: vww(20); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .selectContractEndTime { |
| | | .u-popup { |
| | | .u-transition { |
| | |
| | | .u-popup { |
| | | .u-transition { |
| | | height: 95%; |
| | | |
| | | .u-popup__content { |
| | | overflow: scroll !important; |
| | | |
| | | .addContractFormTitle { |
| | | margin-bottom: 0; |
| | | } |
| | |
| | | // 搜索 |
| | | .coalFiledSelectSearch { |
| | | } |
| | | |
| | | // 选择煤种 |
| | | .coalFiledSelectPopup { |
| | | .u-popup { |
| | | .u-transition { |
| | | height: 80%; |
| | | |
| | | .u-popup__content { |
| | | overflow: scroll !important; |
| | | // 表格 |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | margin: 0 auto; |
| | | |
| | | .uni-table-scroll { |
| | | min-width: 0 !important; |
| | | |
| | | .uni-table { |
| | | .uni-table-tr { |
| | | padding: 0; |
| | | font-size: vww(13); |
| | | |
| | | .uni-table-th { |
| | | width: vww(100); |
| | | height: vww(32); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .tableBody { |
| | | width: 80%; |
| | | } |
| | | |
| | | .TableUtilBtn { |
| | | width: 20%; |
| | | overflow: hidden; |
| | | |
| | | .uni-table { |
| | | min-width: 0 !important; |
| | | } |
| | | |
| | | .TableUtilBtnContainer { |
| | | .u-button { |
| | | width: vww(20); |
| | |
| | | .u-popup { |
| | | .u-transition { |
| | | height: 95%; |
| | | |
| | | .u-popup__content { |
| | | // background-color: rgb(247, 247, 247); |
| | | overflow: scroll !important; |
| | | |
| | | .addContractForm { |
| | | width: 92%; |
| | | margin: 0 auto; |
| | |
| | | box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; |
| | | // margin-top:vww(10); |
| | | background-color: #ffffff; |
| | | |
| | | .currentPriceContainer { |
| | | .currentPriceBox { |
| | | width: 92%; |
| | | margin: 0 auto; |
| | | } |
| | | } |
| | | |
| | | .selectPriceContainer { |
| | | .selectPricebox { |
| | | width: 92%; |
| | | margin: 0 auto; |
| | | |
| | | .selectPriceboxItem { |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .formDownCard { |
| | | border-radius: vww(4); |
| | | padding: vww(10); |
| | |
| | | width: 100%; |
| | | padding: vww(0) vww(10) vww(60) vww(10); |
| | | box-sizing: border-box; |
| | | |
| | | .u-swipe-action { |
| | | .u-swipe-action-item { |
| | | box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; |
| | | margin-top: vww(10); |
| | | |
| | | .u-swipe-action-item__right { |
| | | .u-swipe-action-item__right__button { |
| | | .u-swipe-action-item__right__button__wrapper { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .cardList { |
| | | height: vww(130); |
| | | border-radius: vww(4); |
| | | padding: vww(10); |
| | | position: relative; |
| | | |
| | | .cardListIcon{ |
| | | position:absolute; right: vww(20); top:vww(20); |
| | | position: absolute; |
| | | right: vww(20); |
| | | top: vww(20); |
| | | } |
| | | |
| | | .cardList-container { |
| | | .cardList_item { |
| | | margin-top: vww(12); |
| | | font-size: 14px; |
| | | display: flex; |
| | | |
| | | view { |
| | | width: 50%; |
| | | |
| | | &:nth-child(2) { |
| | | margin-left: vww(20); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .addCard { |
| | | width: 100%; |
| | | height: vww(130); |