| | |
| | | <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="editApplicationIndex != null ? '添加修改':'添加'" type="primary" @click="addContractSanConfirm"></u-button></view> |
| | | </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 == null ? 0 :accountDetails.balanceTotal.toFixed(2) }},承兑余额:{{ 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="index"> |
| | | <view class="cardList"> |
| | | <view class="" class="cardListIcon"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view> |
| | | <view class="cardListIcon" @click="editApplicationClick(index)"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view> |
| | | <view class="cardList-container"> |
| | | <view class="cardList_item"> |
| | | 收货人: |
| | |
| | | loading: false, |
| | | // 价格请求参数 |
| | | getNewPriceData: { |
| | | compId: 133, |
| | | compName: '邢台矿', |
| | | customerAddressName: '邢台国泰发电有限责任公司', |
| | | customerAddressId: 236, |
| | | coalId: 45, |
| | | coalName: '', |
| | | trainType: 1, |
| | | fromStation: '小康庄', |
| | | toStation: '小康庄', |
| | | quant: '', |
| | | price: '', |
| | | amount: '', |
| | | priceMode: null, |
| | | filedName: '邢台矿主煤场', |
| | | filedId: 4, |
| | | type: '', |
| | | cost1: '', |
| | | cost2: '', |
| | | edit: true |
| | | // compId: 133, |
| | | // compName: '邢台矿', |
| | | // customerAddressName: '邢台国泰发电有限责任公司', |
| | | // customerAddressId: 236, |
| | | // coalId: 45, |
| | | // coalName: '', |
| | | // trainType: 1, |
| | | // fromStation: '小康庄', |
| | | // toStation: '小康庄', |
| | | // quant: '', |
| | | // price: '', |
| | | // amount: '', |
| | | // priceMode: null, |
| | | // filedName: '邢台矿主煤场', |
| | | // filedId: 4, |
| | | // type: '', |
| | | // cost1: '', |
| | | // cost2: '', |
| | | // edit: true |
| | | }, |
| | | dust: null, // 抑尘费 |
| | | trainfreight: {}, //路运运费 |
| | |
| | | { |
| | | text: '删除' |
| | | } |
| | | ] |
| | | ], |
| | | editApplicationIndex:null |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | // 添加合同弹出框 |
| | | addContractClose() { |
| | | this.addContractShow = false; |
| | | this.addContractFormdata = {}; |
| | | this.editApplicationIndex = null; |
| | | }, |
| | | addContractOpen() { |
| | | console.log('添加订单打开'); |
| | |
| | | }, |
| | | // 选择的煤厂 |
| | | coalFiledSelectClick(e) { |
| | | console.log('选择的煤厂',e); |
| | | this.addContractFormdata.compName = e.compName; |
| | | this.addContractFormdata.filedName = e.name; |
| | | this.addContractFormdata.compId = e.compId; |
| | |
| | | |
| | | this.selectCoalFiledData = e; |
| | | |
| | | this.coalFiledSelectShow = false; |
| | | // 获取价格参数 |
| | | this.getNewPriceData.compId = e.compId; |
| | | this.getNewPriceData.compName = e.compName; |
| | | this.getNewPriceData.filedId = e.id; |
| | | this.getNewPriceData.filedName = e.name; |
| | | |
| | | |
| | | this.coalFiledSelectShow = false; |
| | | }, |
| | | // 收货人 |
| | | addContractConsigneeClose() { |
| | |
| | | // this.currentCoal.type = 1; |
| | | // } |
| | | this.addContractFormdata.modifyId = data.modifyId; |
| | | this.addContractFormdata.id = data.id; |
| | | // this.addContractFormdata.id = data.id; |
| | | } else { |
| | | uni.$u.toast('煤种价格未设置'); |
| | | } |
| | |
| | | }, |
| | | addContractSanConfirm() { |
| | | if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) { |
| | | this.newFormData.contractOrders.push(this.addContractFormdata); |
| | | console.log('添加子订单',this.addContractFormdata); |
| | | this.$nextTick(() => { |
| | | this.addContractShow = false; |
| | | }); |
| | | if(this.editApplicationIndex != null){ |
| | | this.newFormData.contractOrders[this.editApplicationIndex] = this.addContractFormdata; |
| | | } else { |
| | | this.newFormData.contractOrders.push(this.addContractFormdata); |
| | | console.log('添加子订单',this.addContractFormdata); |
| | | } |
| | | this.addContractShow = false;// 关闭弹出框 |
| | | console.log('this.newFormData.contractOrders当前关闭后',this.newFormData.contractOrders) |
| | | } else { |
| | | uni.$u.toast('请规范输入所有信息'); |
| | | } |
| | |
| | | console.log('删除订单卡片', e); |
| | | this.newFormData.contractOrders.splice(e, 1); |
| | | }, |
| | | editApplicationClick(index){ |
| | | this.editApplicationIndex = index; |
| | | this.addContractFormdata = this.newFormData.contractOrders[index]; |
| | | this.addContractShow = true; |
| | | }, |
| | | xswaybill() { |
| | | console.log('新建发运申请', this.newFormData); |
| | | uni.showLoading({ |
| | |
| | | uni.hideLoading(); |
| | | console.log('新建发运申请', res); |
| | | if (res.code == 0) { |
| | | uni.showToast({ |
| | | title: '添加成功!', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }); |
| | | this.$nextTick(() => { |
| | | uni.navigateBack({ |
| | | // url: '/pages/my-application/my-application' |
| | | delta: 2 |
| | | }); |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '添加成功!', |
| | | // icon: 'success', |
| | | // duration: 1000 |
| | | // }); |
| | | this.$u.toast('添加成功,即将返回申请页!!!') |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | // url: '/pages/my-application/my-application' |
| | | delta: 2 |
| | | }); |
| | | },2000) |
| | | |
| | | } |
| | | }); |
| | | }, |