api/globalApi.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
api/publicInterface.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
api/request.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/driver-page/appointment/appointment.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/driver-page/driver-index/driver-index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/public-page/forward/forward.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
api/globalApi.js
@@ -247,14 +247,14 @@ */ getOneEvacuation: { url: "/wrzs/userOperation/getOneEvacuation", method: 'GET' method: 'POST' }, /** * @description 第二次放空 */ getTwoEvacuation: { url: "/wrzs/userOperation/getTwoEvacuation", method: 'GET' method: 'POST' }, /** * @称重 api/publicInterface.js
@@ -1,12 +1,13 @@ // import {resolve} from "../unpackage/dist/dev/mp-weixin/common/vendor"; // import login from "../pages/login/login"; // const BaseUrl = "http://192.168.3.159:9999/"; import { BaseUrl as wrBaseUrl } from '@/api/request.js' const BaseUrl = "http://192.168.0.110:9999"; // const BaseUrl = "http://hesuancj.cn:9999" const BaseUrl = "https://hesuancj.cn:9095" // const BaseUrl = "https://hesuancj.cn:9095" // const BaseUrl = "http://192.168.3.119:9999" // 登录 api/request.js
@@ -82,12 +82,13 @@ // const webSocketUrl = "ws://192.168.3.119:9997/wrzs/ws/info" // const BaseUrl = "http://192.168.3.119:9997"; // const BaseUrl = "http://192.168.0.144:9997"; const BaseUrl = "http://192.168.0.110:9997"; const webSocketUrl = "ws://192.168.0.110:9997/wrzs/ws/info" // const BaseUrl = "http://hesuancj.cn:9997"; // 线上 const BaseUrl = "https://hesuancj.cn:9095"; // const BaseUrl = "https://hesuancj.cn:9095"; // const webSocketUrl = "wss://hesuancj.cn:9095/wrzs/ws/info" const webSocketUrl = "wss://hesuancj.cn:9095/wrzs/ws/info" // const webSocketUrl = "ws://hesuancj.cn:9997/wrzs/ws/info" // 请求拦截 const fetch = (url, opt) => { pages/driver-page/appointment/appointment.vue
@@ -98,9 +98,9 @@ this.$u.toast('预约成功!'); uni.navigateBack({ delta: 1 }) }); } else { this.$u.toast(res.data ? res.data : '预约失败'); this.$u.toast(res.msg ? res.msg : '预约失败'); } setTimeout(() => { this.yuYueList(); pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -100,7 +100,7 @@ sceneId: '', gateCameraId: '', equipmentCode: '', weigh: 0 weigh: 30 } }; }, @@ -248,7 +248,9 @@ uni.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${ res.data.id }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}` }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&getWeightHouseObj=${JSON.stringify( this.getWeightHouseObj )}` }); } else { this.$u.toast('未在磅房,请前往磅房后再试!!'); @@ -286,11 +288,11 @@ }); socket.onClose(() => { console.log('webSocketClose'); this.$u.toast('磅房接口终端'); this.$u.toast('磅房中断'); }); socket.onError(err => { console.log('socket报错', err); this.$u.toast('磅房接口暂时不能使用,请重新进入该页面,重试!!'); this.$u.toast('出现错误,请重新进入该页面,重试!!'); }); }, // 放空 @@ -302,7 +304,13 @@ let mix = Object.assign(this.weighData, this.getWeightHouseObj); this.$reqPost('getOneEvacuation', mix, 'json').then(res => { console.log(res, '第一次放空'); this.evacuationModalShow = false; if (res.code == 0) { this.$u.toast('已放空'); this.evacuationModalShow = false; } else { this.$u.toast('放空失败,请稍后重试'); this.evacuationModalShow = false; } }); }, // 放空弹窗取消 pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -34,7 +34,8 @@ <p>矿场名称:{{ weighList.filedName || '' }}</p> </view> <view class="three"> <u-button type="primary" text="放空" plain @click="evacuation" throttleTime="500"></u-button> <!-- 放空 --> <u-button type="primary" text="放空" plain @click="evacuation" throttleTime="500" :disabled="isEvacuation"></u-button> <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 --> <u-button type="primary" @@ -44,9 +45,10 @@ loadingText="加载中" @click="confirmWeigh" ></u-button> <u-button type="primary" text="返回加减吨" :disabled="addAndSubtractCoalDisabled" v-if="weighList.orderTye == '外销'" @click="addAndSubtractCoal"></u-button> <u-button type="primary" text="返回加减吨" :disabled="addAndSubtractCoalDisabled" @click="addAndSubtractCoal" class="jiajian"></u-button> </view> <view class="four" v-if="weighList.orderTye == '外销'">如您需要调整装载货品吨数,请点击返回加减吨</view> <!-- 放空弹窗 --> <view class="evacuationModal"> <u-modal :show="evacuationModalShow" @@ -65,6 +67,7 @@ import { webSocketUrl } from '@/api/request.js'; export default { onLoad(params) { console.log(params, '第二次放空参数'); this.takeCoalId = params.takeCoalId; this.weighData.sceneId = params.sceneId; this.weighData.gateCameraId = params.gateCameraId; @@ -73,6 +76,8 @@ }, data() { return { // 是否可点击放空 isEvacuation: false, weighData: { //确认称重接口参数 deptId: '', @@ -149,21 +154,16 @@ return false; } } }, isEvacuation() { if (this.weighList.hair == this.weighList.skin || this.temporaryWeighObj.skin == this.temporaryWeighObj.hair) { return false; } else { return true; } } }, methods: { // 放空 evacuation() { this.evacuationModalShow = true; }, // 放空弹窗确认 evacuationConfirm() { this.evacuationModalShow = false; }, // 放空弹窗取消 evacuationCancel() { this.evacuationModalShow = false; }, init() { // 获取称重信息 this.$reqGet('weighList', { id: this.takeCoalId }).then(res => { @@ -273,6 +273,21 @@ console.log('socket报错', err); this.$u.toast('磅房接口暂时不能使用,请重新进入该页面,重试!!'); }); }, // 放空 evacuation() { this.evacuationModalShow = true; }, // 放空弹窗确认 evacuationConfirm() { this.$reqPost('getTwoEvacuation', this.weighData, 'json').then(res => { console.log(res, '第二次放空'); this.evacuationModalShow = false; }); }, // 放空弹窗取消 evacuationCancel() { this.evacuationModalShow = false; } } }; @@ -335,6 +350,9 @@ &:nth-of-type(2) { margin-left: vww(10); } &:nth-of-type(3) { margin-left: vww(10); } } } .four { pages/driver-page/driver-index/driver-index.vue
@@ -16,7 +16,9 @@ <text>{{ item.carNum }}</text> 张 </view> <view class="card-left__utils"><u-button @tap.stop="qiangDanBtn(item)" text="抢单" type="primary" shape="circle"></u-button></view> <view class="card-left__utils"> <u-button @tap.stop="qiangDanBtn(item)" text="抢单" type="primary" shape="circle" v-if="item.carNum - item.taskNum !== 0"></u-button> </view> </template> <template v-slot:right-top> <view class="right-top"> @@ -118,7 +120,7 @@ <view>排队数:暂无{{}}</view> </view> <view class="haveYuYueBottom"> <text>{{ item.yuYueTime || '时段' }}</text> <text>{{ item.yuYueSection || '时段' }}</text> </view> </view> </view> pages/freight-forwarder-page/freightForwarder-index/freightForwarder-index.vue
@@ -8,7 +8,9 @@ <text>{{ item.carNum }}</text> 张 </view> <view class="card-left__utils"><u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle"></u-button></view> <view class="card-left__utils"> <u-button text="转发" type="primary" @tap.stop="forwardClick(item)" shape="circle" v-if="item.carNumSurplusHuodai !== 0"></u-button> </view> </template> <template v-slot:right-top> <view class="right-top"> @@ -43,13 +45,13 @@ <uni-th align="center" width="80">提煤单个数</uni-th> </uni-tr> <uni-tr v-for="(item, index) in historyCoalData" :key="index"> <uni-td align="center">{{ item.sendDate }}</uni-td> <uni-td align="left">{{ item.deptName }}</uni-td> <uni-td align="center">{{ item.filedName }}</uni-td> <uni-td align="center">{{ item.coalName }}</uni-td> <uni-td align="center">{{ item.orderCode }}</uni-td> <uni-td align="center">{{ item.carNumSurplus }}</uni-td> <uni-td align="center">{{ item.tmCount }}</uni-td> <uni-td align="center" @row-click="faYundetail(item)">{{ item.sendDate }}</uni-td> <uni-td align="left" @row-click="faYundetail(item)">{{ item.deptName }}</uni-td> <uni-td align="center" @row-click="faYundetail(item)">{{ item.filedName }}</uni-td> <uni-td align="center" @row-click="faYundetail(item)">{{ item.coalName }}</uni-td> <uni-td align="center" @row-click="faYundetail(item)">{{ item.orderCode }}</uni-td> <uni-td align="center" @row-click="faYundetail(item)">{{ item.carNumSurplus }}</uni-td> <uni-td align="center" @row-click="faYundetail(item)">{{ item.tmCount }}</uni-td> </uni-tr> </uni-table> <view class="more_text" v-if="showMoreData && historyCoalData.length !== 0">没有数据了...</view> @@ -163,6 +165,12 @@ uni.navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${value.orderPlanId}&carNumSurplusHuodai=${value.carNumSurplusHuodai}&carNum=${value.carNum}` }); }, // 点击历史提煤单一行获取详情 faYundetail(v) { uni.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}` }); } } }; pages/public-page/forward/forward.vue
@@ -12,7 +12,7 @@ <view class="forward-card-amount"> <view class="forward-card-amount-input"><u--input v-model="val.carNum" placeholder="请输入转发数量"></u--input></view> <u-checkbox-group v-model="val.checkboxValue1" placement="column" @change="v => checkboxChange(v, index)"> <u-checkbox :customStyle="{ marginBottom: '8px' }" size="30" labelSize="30" label="全部转发" name="全部转发"></u-checkbox> <u-checkbox :customStyle="{ marginBottom: '8px' }" size="30" labelSize="30" label="全部转发" name="全部转发" :disabled="val.ischecked"></u-checkbox> </u-checkbox-group> </view> </u-form-item> @@ -32,14 +32,18 @@ <view class="" v-if="!tabHuoDai"> <u-cell-group> <u-cell v-for="(item, index) in fleetData" :key="index" :title="item.name"> <view class="cell-util" slot="value"><u-button @click="forwardFleetObjectSelect(item)" text="选择" type="primary" size="mini"></u-button></view> <view class="cell-util" slot="value"> <u-button @click="forwardFleetObjectSelect(item, index)" text="选择" type="primary" size="mini"></u-button> </view> </u-cell> </u-cell-group> </view> <view class="" v-else-if="tabHuoDai"> <u-cell-group> <u-cell v-for="(item, index) in huoDaiData" :key="index" :title="item.name"> <view class="cell-util" slot="value"><u-button @click="forwardHuoDaiObjectSelect(item)" text="选择" type="primary" size="mini"></u-button></view> <view class="cell-util" slot="value"> <u-button @click="forwardHuoDaiObjectSelect(item, index)" text="选择" type="primary" size="mini"></u-button> </view> </u-cell> </u-cell-group> </view> @@ -54,6 +58,7 @@ export default { onLoad(params) { console.log(params, '转发页面的参数'); // 客户 this.cars2 = Number(params.cars2); this.carNumSurplus1 = Number(params.carNumSurplus1); @@ -169,66 +174,141 @@ break; } }, checkboxChange(value, index) { console.log('复选框变化', value, index); if (value.length != 0) { console.log(this.forwardSurplus, '货代转发全部数量'); this.jhOrderPlanForwardList[index].carNum = this.forwardSurplus; allrelay(x, y) { let a = 0; if (y != 0) { a = x + y; return a; } else { this.jhOrderPlanForwardList[index].carNum = null; return x; } }, allrelayto(x, y) { let a = 0; if (y != 0) { a = x - y; return a; } else { return x; } }, checkboxChange(value, index) { uni.setStorageSync('allrelay', this.jhOrderPlanForwardList[index].carNum); this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map((v, i) => { return { ...v, ischecked: false }; }); if (value.length != 0) { let tempforwardSurplus = this.forwardSurplus; let tempcarNumSurplus1 = this.carNumSurplus1; // 计算全部转发数 // 客户 if (this.roleType == 1) { this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, tempcarNumSurplus1); } tempcarNumSurplus1 = 0; // 货代 if (this.roleType == 2) { this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, tempforwardSurplus); } tempforwardSurplus = 0; // 选择一个后其余禁止复选 this.jhOrderPlanForwardList.forEach((v, i) => { if (i !== index) { v.ischecked = true; } }); } else { let tempforwardSurplus = this.forwardSurplus; let tempcarNumSurplus1 = this.carNumSurplus1; // 货代 if (this.roleType == 2) { this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.forwardSurplus); } // 客户 if (this.roleType == 1) { this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.carNumSurplus1); } } }, // 获取货代列表 getAllHuoDaiByCustomerId() { this.$reqGet('getAllHuoDaiByCustomerId').then(res => { this.huoDaiData = res.data; console.log('货代列表', res); }); }, // 获取车队列表 getFleet() { this.$reqGet('getFleet').then(res => { this.fleetData = res.data; console.log('车队列表', res); }); }, // 转发 forwardObjectClick(index) { this.selectPopupShow = true; this.index = index; console.log(this.huoDaiData, this.fleetData, '转发'); }, selectPopupClose() { this.selectPopupShow = false; }, selectPopupOpen() { console.log('弹出框打开了'); }, selectPopupOpen() {}, // 转发选择货代 forwardHuoDaiObjectSelect(item) { this.selectPopupShow = false; this.jhOrderPlanForwardList[this.index].xsUserId = item.userId; this.jhOrderPlanForwardList[this.index].name = item.name; this.jhOrderPlanForwardList[this.index].fleetId = 0; console.log('货代选择', this.jhOrderPlanForwardList[this.index]); forwardHuoDaiObjectSelect(item, index) { this.$nextTick(() => { let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name); if (isableAdd.length > 0) { this.$u.toast('存在重复添加'); this.selectPopupShow = true; } else { this.selectPopupShow = false; this.jhOrderPlanForwardList[this.index].xsUserId = item.userId; this.jhOrderPlanForwardList[this.index].name = item.name; this.jhOrderPlanForwardList[this.index].fleetId = 0; } }); }, // 转发选择车队 forwardFleetObjectSelect(item) { this.selectPopupShow = false; this.jhOrderPlanForwardList[this.index].fleetId = item.id; this.jhOrderPlanForwardList[this.index].name = item.name; this.jhOrderPlanForwardList[this.index].xsUserId = 0; console.log('车队选择', this.jhOrderPlanForwardList[this.index]); }, addForm() { this.jhOrderPlanForwardList.push({ orderPlanId: this.orderPlanId, name: '', carNum: 0, xsUserId: 0, fleetId: 0, checkboxValue1: '' forwardFleetObjectSelect(item, index) { this.$nextTick(() => { let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name); if (isableAdd.length > 0) { this.$u.toast('存在重复添加'); this.selectPopupShow = true; } else { this.selectPopupShow = false; this.jhOrderPlanForwardList[this.index].fleetId = item.id; this.jhOrderPlanForwardList[this.index].name = item.name; this.jhOrderPlanForwardList[this.index].xsUserId = 0; } }); }, // 添加一组表单 addForm() { // 判断是否有一个复选,如果有则禁止新加的复选,没有则不禁止 let ischeck = this.jhOrderPlanForwardList.some(v => v.ischecked == true); if (!ischeck) { this.jhOrderPlanForwardList.push({ orderPlanId: this.orderPlanId, name: '', carNum: 0, xsUserId: 0, fleetId: 0, checkboxValue1: '', ischecked: false }); } else { this.jhOrderPlanForwardList.push({ orderPlanId: this.orderPlanId, name: '', carNum: 0, xsUserId: 0, fleetId: 0, checkboxValue1: '', ischecked: true }); } }, // 删除一组表单 deleteGroup(index, v) { @@ -250,6 +330,9 @@ // 提交 submitForm() { let isPass = false; if (this.jhOrderPlanForwardList.length === 0) { this.$u.toast('请至少选择一组转发对象'); } this.jhOrderPlanForwardList.forEach(v => { if (isNaN(Number(v.carNum)) || Number(v.carNum) <= 0) { this.$u.toast('请输入合法数字'); @@ -281,7 +364,6 @@ } }, tabClick(item) { console.log('tab点击', item); if (item.name == '货代') { this.tabHuoDai = true; } else {