From 2ab92240f1eccf659d7380dc524e76faca6f644c Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期三, 04 十二月 2024 15:37:44 +0800 Subject: [PATCH] feat:库管新页面提交 --- subPages/pvcSplicePage/view.vue | 360 +++++++++++++++++++++++++++ subPages/pvcSplicePage/kuguan.vue | 43 +++ subPages/pvcSplicePage/index.vue | 367 ++++++++++++++++++++++++++++ 3 files changed, 770 insertions(+), 0 deletions(-) diff --git a/subPages/pvcSplicePage/index.vue b/subPages/pvcSplicePage/index.vue new file mode 100644 index 0000000..97955a0 --- /dev/null +++ b/subPages/pvcSplicePage/index.vue @@ -0,0 +1,367 @@ +<template> +<div class="warp"> + <!-- 鍙告満寰呮嫾鍗曞垪琛� --> + <div class="daiPin"> + <combined-title title="寰呮嫾鍗曟棩璁″垝"> + </combined-title> + <view class="table"> + <uni-table border + stripe + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <!-- <uni-th align="center">缂栧彿</uni-th> --> + <uni-th align="center">浜у搧</uni-th> + <uni-th align="center">瀹㈡埛</uni-th> + <uni-th align="center">鎿嶄綔</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in daiPageList" + :key="item.id"> + + <uni-td align="center">{{ item.productName || '' }}</uni-td> + <uni-td align="center">{{ item.customerName || '' }}</uni-td> + <uni-td align="center"><u-button text="閫夋嫨" + type="primary" + :disabled=" item.isPretendDischar === 1" + @click="enterOk(item)"></u-button></uni-td> + </uni-tr> + </uni-table> + </view> + </div> + <!-- 鍙告満宸叉嫾鍗曞垪琛� --> + <!-- <div class="border"></div> --> + <div class="yiPin"> + <combined-title title="宸叉嫾鍗曞垪琛�"></combined-title> + <view class="table"> + <uni-table border + stripe + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <!-- <uni-th align="center">缂栧彿</uni-th> --> + <uni-th align="center">浜у搧</uni-th> + <uni-th align="center">瀹㈡埛</uni-th> + <uni-th align="center">鎿嶄綔</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in yiPageList" + :key="item.id"> + <uni-td align="center">{{ item.productName || '' }}</uni-td> + <uni-td align="center">{{ item.customerName || '' }}</uni-td> + <uni-td align="center"><u-button text="鍒犻櫎" + type="error" + v-if="item.mainTmTaskId" + :disabled=" item.isPretendDischar === 1" + @click="deletePvcOrder(item)"></u-button></uni-td> + + </uni-tr> + </uni-table> + </view> + </div> + <!-- 纭鍚ㄦ暟寮规 --> + <u-popup :show="showLing" + @close="closeling" + closeOnClickOverlay + @open="openLing" + mode="center" + round="10"> + <view class="receiverPopup"> + <view class="tableCon" v-if="pageList.length"> + <!-- <uni-table border + stripe + + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th align="center"></uni-th> + <uni-th align="center">浜у搧鍚嶇О</uni-th> + <uni-th align="center">浜у搧绛夌骇</uni-th> + <uni-th align="center">鍚ㄦ暟</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in pageList" + :key="item.id"> + <uni-td align="center"> + <u-radio-group + v-model="item.flag" + placement="column" + @change="(v)=>groupChange(v,item.flag)" + > + <u-radio + :iconSize='40' + :customStyle="{marginBottom: '8px'}" + @change="radioChange(item.flag)" + > + </u-radio> + </u-radio-group> + </uni-td> + <uni-td align="center">{{ item.productName}}</uni-td> + <uni-td align="center">{{ item.productGrade}}</uni-td> + <uni-td align="center"> {{item.planMeasure}}</uni-td> + </uni-tr> + </uni-table> --> + <view style="text-align: center;">閫夋嫨鍚ㄦ暟</view> + <u-radio-group v-model="radioValue" borderBottom placement="column" + + @change="radioChange" + > + <view + style="margin:15rpx" v-for="(item, index) in pageList" :key="index"> + <u-radio + :size='40' + :iconSize='50' labelSize='32' shape="circle" + + :key="index" + :label="`${item.productName} - ${item.productGrade?item.productGrade : '鏆傛棤绛夌骇' } - ${item.planMeasure}鍚╜" + :name="item.id"></u-radio> + </view> + + </u-radio-group> + + + </view> + <view class="receiverPopup__btn"><u-button text="纭畾" + type="primary" + @click="popupDetermineClick" + :loading="ClickLoading"></u-button></view> + </view> + </u-popup> + <view class="qianDanModel"> + <u-modal :show="quxiaoShow" + :title="'鎻愮ず'" + showCancelButton + :content="'纭鍒犻櫎锛�'" + @confirm="quxiaoConfirm" + @cancel="quxiaoCancel"></u-modal> + </view> +</div> + +</template> + +<script> +import combinedTitle from '@/components/combined-title/combined-title.vue'; +export default { + onLoad(params){ + console.log(params,'params') + this.mainTmTaskId = JSON.parse(params.item).id; + console.log(JSON.parse(params.item).id,'213123') + + }, + components: { + combinedTitle, + + }, + onShow(){ + this.init(); + }, + data() { + return { + daiPageList:[], + yiPageList:[], + quxiaoShow:false, + radioValue:'', + deletItem:{}, + activeObj:{}, + pageList:[], + lingFlag:true, + showLing:false, + mainTmTaskId:'', //涓昏鍗昳d + ClickLoading:false, + + } + }, + methods: { + init(){ + this.$reqGet('pvcSplicingList').then((res) => { + console.log(res,'res') + this.daiPageList = res.data.list1; + this.yiPageList = res.data.list2; + + }) + }, + enterOk(item){ + this.activeObj = item; + this.getBuild(); + + }, + getBuild(item){ + this.$reqGet('getBuildList',{orderPlanId:this.activeObj.orderPlanId,customerId:this.activeObj.customerId,status:1,fleetId:this.activeObj.fleetId}).then(res=>{ + console.log(res,'resss') + this.showLing = true; + this.pageList = res.data.map(item=>{ + item.flag = false + return item; + }); + }) + + + }, + closeling(){ + this.radioValue = ''; + this.showLing = false; + }, + //鐐瑰嚮纭畾 + popupDetermineClick(){ + if(!this.radioValue){ + return this.$u.toast('蹇呴』閫夋嫨瑙勬牸') + }else{ + if (this.activeObj.tmcCount == '0') { + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } else { + // this.qiangDanOrderPlanId = value.orderPlanId; + // this.fleetId = value.fleetId; + // this.customerId = !value.customerId ? '0' : value.customerId; + // this.xsUserId = !value.xsUserId ? '0' : value.xsUserId; + // this.qiangDanShow = true; + this.$u.toast(`褰撳墠宸叉帴${value.tmcCount}鍗昤); + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } + } + + + }, + openLing(){ + + }, + qiangDan(id, fleetId, customerId, xsUserId,tmId) { + uni.showLoading({ + title: '鍔犺浇涓�' + }) + this.$reqPost('pvcSplicingOfDriver', { + orderPlanId: id, + fleetId: fleetId, + customerId: customerId, + xsUserId: xsUserId, + pvcForwardId:this.lingFlag? this.radioValue : null, + tmId:tmId + }, 'params') + .then(res => { + uni.hideLoading() + if (res.code == 0) { + this.$u.toast('鎺ュ崟鎴愬姛'); + this.showLing =false; + + } else { + this.$u.toast(res.msg ? res.msg : '鎺ュ崟澶辫触'); + this.showLing =false; + } + }) + .then(() => { + setTimeout(() => { + this.init(); + this.radioValue = ''; + this.showLing =false; + }, 1500); + }).catch(e => { + uni.hideLoading() + }) + }, + radioChange(n) { + console.log(n,'213') + + }, + deletePvcOrder(deletItem){ + this.deletItem = deletItem; + this.quxiaoShow = true; + + + }, + deletePvcOrderFun(){ + this.$reqGet('cancelPindan',{ + takeCoalId:this.mainTmTaskId, + pvcPindanId:this.deletItem.id, + }).then(res=>{ + if(res.code === 0){ + console.log(res,'resss') + this.$u.toast('鍒犻櫎鎴愬姛') + this.quxiaoShow = false; + this.init(); + }else{ + this.$u.toast('鎿嶄綔澶辫触') + } + + }) + }, + quxiaoConfirm(){ + this.deletePvcOrderFun(); + }, + quxiaoCancel(){ + this.quxiaoShow = false; + } + + }, + + +} +</script> + +<style lang="scss" scoped> +.warp{ + width: 100%; + height: calc(100vh - 105rpx); + display: flex; + flex-direction: column; + justify-content: space-between; + .daiPin{ + display: flex; + flex: 0 1 48%; + flex-direction: column; + + } + .yiPin{ + display: flex; + flex: 0 1 48%; + flex-direction: column; + + } + +} +.table{ + width: 98%; + /deep/ .uni-table{ + width: 100%!important; + min-width: 0!important; + margin-left: 20rpx; + } + +} +.border{ + width: 98%; + margin: 0 auto;; + height: 20rpx; + border-top: dashed 1px #000; +} +.receiverPopup { + height: vww(280); + width: 700rpx; + padding: 20rpx; + // overflow: auto; + // position: relative; + .image{ + width: 100%; + height: vww(110); + display: flex; + align-items: center; + justify-content: center; + } + .tables{ + width: 100%; + } + .receiverPopup__title { + margin: vww(10) auto 0; + width: 80%; + text-align: center; + } + + + &__btn { + margin: vww(10) auto; + width: 50%; + position: absolute; + left: 25%; + top: 87%; + + .u-button { + height: vww(20); + } + } + } + +</style> \ No newline at end of file diff --git a/subPages/pvcSplicePage/kuguan.vue b/subPages/pvcSplicePage/kuguan.vue new file mode 100644 index 0000000..9dc7d33 --- /dev/null +++ b/subPages/pvcSplicePage/kuguan.vue @@ -0,0 +1,43 @@ +<template> +<div class="warp"> + 搴撶瑁呭嵏 +</div> +</template> + +<script> +export default { + data() { + return { + pageData:[], + id:'', + } + }, + onLoad(params){ + + console.log(params,'123') + this.id = params.id; + this.init(params.id); + + }, + onShow(){ + + }, + methods: { + init(id){ + this.$reqGet('getPdListByMainTmTaskCoalId',{mainTmTaskCoalId:id}).then((res) => { + console.log(res,'res') + }) + } + }, + +} +</script> + +<style lang="scss" scoped> +.warp{ + width: 100%; + height: calc(100vh - 75px); + +} + +</style> diff --git a/subPages/pvcSplicePage/view.vue b/subPages/pvcSplicePage/view.vue new file mode 100644 index 0000000..692beb5 --- /dev/null +++ b/subPages/pvcSplicePage/view.vue @@ -0,0 +1,360 @@ +<template> + <div class="warp"> + <!-- 鍙告満寰呮嫾鍗曞垪琛� --> + <div class="daiPin"> + <combined-title title="寰呮嫾鍗曟棩璁″垝"> + </combined-title> + <view class="table"> + <uni-table border + stripe + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <!-- <uni-th align="center">缂栧彿</uni-th> --> + <uni-th align="center">浜у搧</uni-th> + <uni-th align="center">瀹㈡埛</uni-th> + <uni-th align="center">鎿嶄綔</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in daiPageList" + :key="item.id"> + + <uni-td align="center">{{ item.productName || '' }}</uni-td> + <uni-td align="center">{{ item.customerName || '' }}</uni-td> + <!-- <uni-td align="center"><u-button text="閫夋嫨" + type="primary" + :disabled="item.carNum == item.carNum1&&!isRCSQ" + @click="enterOk(item)"></u-button></uni-td> --> + </uni-tr> + </uni-table> + </view> + </div> + <!-- 鍙告満宸叉嫾鍗曞垪琛� --> + <!-- <div class="border"></div> --> + <div class="yiPin"> + <combined-title title="宸叉嫾鍗曞垪琛�"></combined-title> + <view class="table"> + <uni-table border + stripe + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <!-- <uni-th align="center">缂栧彿</uni-th> --> + <uni-th align="center">浜у搧</uni-th> + <uni-th align="center">瀹㈡埛</uni-th> + <uni-th align="center">鎿嶄綔</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in yiPageList" + :key="item.id"> + <uni-td align="center">{{ item.productName || '' }}</uni-td> + <uni-td align="center">{{ item.customerName || '' }}</uni-td> + <!-- <uni-td align="center"><u-button text="鍒犻櫎" + type="error" + v-if="item.mainTmTaskId" + @click="deletePvcOrder(item)"></u-button></uni-td> --> + + </uni-tr> + </uni-table> + </view> + </div> + <!-- 纭鍚ㄦ暟寮规 --> + <u-popup :show="showLing" + @close="closeling" + closeOnClickOverlay + @open="openLing" + mode="center" + round="10"> + <view class="receiverPopup"> + <view class="tableCon" v-if="pageList.length"> + <!-- <uni-table border + stripe + + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th align="center"></uni-th> + <uni-th align="center">浜у搧鍚嶇О</uni-th> + <uni-th align="center">浜у搧绛夌骇</uni-th> + <uni-th align="center">鍚ㄦ暟</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in pageList" + :key="item.id"> + <uni-td align="center"> + <u-radio-group + v-model="item.flag" + placement="column" + @change="(v)=>groupChange(v,item.flag)" + > + <u-radio + :iconSize='40' + :customStyle="{marginBottom: '8px'}" + @change="radioChange(item.flag)" + > + </u-radio> + </u-radio-group> + </uni-td> + <uni-td align="center">{{ item.productName}}</uni-td> + <uni-td align="center">{{ item.productGrade}}</uni-td> + <uni-td align="center"> {{item.planMeasure}}</uni-td> + </uni-tr> + </uni-table> --> + <view style="text-align: center;">閫夋嫨鍚ㄦ暟</view> + <u-radio-group v-model="radioValue" borderBottom placement="column" + + @change="radioChange" + > + <view + style="margin:15rpx" v-for="(item, index) in pageList" :key="index"> + <u-radio + :size='40' + :iconSize='50' labelSize='32' shape="circle" + + :key="index" + :label="`${item.productName} - ${item.productGrade?item.productGrade : '鏆傛棤绛夌骇' } - ${item.planMeasure}鍚╜" + :name="item.id"></u-radio> + </view> + + </u-radio-group> + + + </view> + <view class="receiverPopup__btn"><u-button text="纭畾" + type="primary" + @click="popupDetermineClick" + :loading="ClickLoading"></u-button></view> + </view> + </u-popup> + <view class="qianDanModel"> + <u-modal :show="quxiaoShow" + :title="'鎻愮ず'" + showCancelButton + :content="'纭鍒犻櫎锛�'" + @confirm="quxiaoConfirm" + @cancel="quxiaoCancel"></u-modal> + </view> + </div> + + </template> + + <script> + import combinedTitle from '@/components/combined-title/combined-title.vue'; + export default { + onLoad(params){ + console.log(params,'params') + this.mainTmTaskId = JSON.parse(params.item).id; + console.log(JSON.parse(params.item).id,'213123') + + }, + components: { + combinedTitle, + + }, + onShow(){ + this.init(); + }, + data() { + return { + daiPageList:[], + yiPageList:[], + quxiaoShow:false, + radioValue:'', + deletItem:{}, + activeObj:{}, + pageList:[], + lingFlag:true, + showLing:false, + mainTmTaskId:'', //涓昏鍗昳d + ClickLoading:false, + + } + }, + methods: { + init(){ + this.$reqGet('pvcSplicingList').then((res) => { + console.log(res,'res') + this.daiPageList = res.data.list1; + this.yiPageList = res.data.list2; + + }) + }, + enterOk(item){ + this.activeObj = item; + this.getBuild(); + + }, + getBuild(item){ + this.$reqGet('getBuildList',{orderPlanId:this.activeObj.orderPlanId,customerId:this.activeObj.customerId,status:1,fleetId:this.activeObj.fleetId}).then(res=>{ + console.log(res,'resss') + this.showLing = true; + this.pageList = res.data.map(item=>{ + item.flag = false + return item; + }); + }) + + + }, + closeling(){ + this.radioValue = ''; + this.showLing = false; + }, + //鐐瑰嚮纭畾 + popupDetermineClick(){ + if (this.activeObj.tmcCount == '0') { + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } else { + // this.qiangDanOrderPlanId = value.orderPlanId; + // this.fleetId = value.fleetId; + // this.customerId = !value.customerId ? '0' : value.customerId; + // this.xsUserId = !value.xsUserId ? '0' : value.xsUserId; + // this.qiangDanShow = true; + this.$u.toast(`褰撳墠宸叉帴${value.tmcCount}鍗昤); + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } + + }, + openLing(){ + + }, + qiangDan(id, fleetId, customerId, xsUserId,tmId) { + uni.showLoading({ + title: '鍔犺浇涓�' + }) + this.$reqPost('pvcSplicingOfDriver', { + orderPlanId: id, + fleetId: fleetId, + customerId: customerId, + xsUserId: xsUserId, + pvcForwardId:this.lingFlag? this.radioValue : null, + tmId:tmId + }, 'params') + .then(res => { + uni.hideLoading() + if (res.code == 0) { + this.$u.toast('鎺ュ崟鎴愬姛'); + this.showLing =false; + + } else { + this.$u.toast(res.msg ? res.msg : '鎺ュ崟澶辫触'); + this.showLing =false; + } + }) + .then(() => { + setTimeout(() => { + this.init(); + this.radioValue = ''; + this.showLing =false; + }, 1500); + }).catch(e => { + uni.hideLoading() + }) + }, + radioChange(n) { + console.log(n,'213') + + }, + deletePvcOrder(deletItem){ + this.deletItem = deletItem; + this.quxiaoShow = true; + + + }, + deletePvcOrderFun(){ + this.$reqGet('cancelPindan',{ + takeCoalId:this.mainTmTaskId, + pvcPindanId:this.deletItem.id, + }).then(res=>{ + if(res.code === 0){ + console.log(res,'resss') + this.$u.toast('鍒犻櫎鎴愬姛') + this.init(); + }else{ + this.$u.toast('鎿嶄綔澶辫触') + } + + }) + }, + quxiaoConfirm(){ + this.deletePvcOrderFun(); + }, + quxiaoCancel(){ + this.quxiaoShow = false; + } + + }, + + + } + </script> + + <style lang="scss" scoped> + .warp{ + width: 100%; + height: calc(100vh - 105rpx); + display: flex; + flex-direction: column; + justify-content: space-between; + .daiPin{ + display: flex; + flex: 0 1 48%; + flex-direction: column; + + } + .yiPin{ + display: flex; + flex: 0 1 48%; + flex-direction: column; + + } + + } + .table{ + width: 98%; + /deep/ .uni-table{ + width: 100%!important; + min-width: 0!important; + margin-left: 20rpx; + } + + } + .border{ + width: 98%; + margin: 0 auto;; + height: 20rpx; + border-top: dashed 1px #000; + } + .receiverPopup { + height: vww(280); + width: 700rpx; + padding: 20rpx; + // overflow: auto; + // position: relative; + .image{ + width: 100%; + height: vww(110); + display: flex; + align-items: center; + justify-content: center; + } + .tables{ + width: 100%; + } + .receiverPopup__title { + margin: vww(10) auto 0; + width: 80%; + text-align: center; + } + + + &__btn { + margin: vww(10) auto; + width: 50%; + position: absolute; + left: 25%; + top: 87%; + + .u-button { + height: vww(20); + } + } + } + + </style> \ No newline at end of file -- Gitblit v1.9.1