123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664 |
- <template>
- <view class="wrap">
- <view>
- <view style='margin-left:10px;'>任务详情</view>
- <view class="content">
- <view class="row">
- <view class="left">合同编号</view>
- <view>{{detailData.contractNo}}</view>
- </view>
- <view class="row">
- <view class="left">货名</view>
- <view>{{detailData.goodsName}}</view>
- </view>
- <view class="row">
- <view class="left">重量</view>
- <view>{{detailData.weight}}</view>
- </view>
- <view class="row">
- <view class="left">发货地址</view>
- <view>{{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}</view>
- </view>
- <view class="row">
- <view class="left">收货地址</view>
- <view>{{detailData.receivePrivate}}{{detailData.receiveCity}}{{detailData.receiveArea}}</view>
- </view>
- </view>
- <!-- 汽运 -->
- <view class="flex title_css">
- <view class="head_css">汽运反馈({{sendCarList?sendCarList:0}})<image :src="carurl" class="open_css" @click="openCar"></image>
- </view>
- </view>
-
- <view class="content" v-if="carShow" v-for="(item,index) in detailData.tranCarInfoList1">
-
- <!-- 车牌号 -->
- <view class="c-row">
- <view class="title">车牌号</view>
- <view class="con-list">
- <input v-model='item.carNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 箱号 -->
- <view class="c-row">
- <view class="title">箱号-1</view>
- <view class="con-list">
- <input v-model='item.caseNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <view class="c-row">
- <view class="title">箱号-2</view>
- <view class="con-list">
- <input v-model='item.caseNoOther' placeholder="暂无" name="input"></input>
- </view>
- </view>
- <!-- 封号 -->
- <view class="c-row">
- <view class="title">封号-1</view>
- <view class="con-list">
- <input v-model='item.titleNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <view class="c-row">
- <view class="title">封号-2</view>
- <view class="con-list">
- <input v-model='item.titleNoOther' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 装车净重 -->
- <view class="c-row">
- <view class="title">装车净重(吨)</view>
- <view class="con-list">
- <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 卸车日期 -->
- <view class="c-row">
- <view class="title">卸车净重(吨)</view>
- <view class="con-list">
- <input v-model='item.unloadNetWeight' placeholder="请输入卸车净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
- </view>
- </view>
- <view class="flex">
- <!-- <u-button @click='pass(1,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
- <view class="btn" @click='pass(1,index)' v-if="item.status != '已送达'">保存</view>
- </view>
- </view>
- <!-- 以上汽运 -->
- <!-- 火运反馈 -->
- <view class="flex title_css">
- <view class="head_css">火运反馈({{trainCarList?trainCarList:0}})<image :src="trainCarurl" class="open_css"
- @click="trainCar"></image>
- </view>
- </view>
- <view class="content" v-if="trainCarShow" v-for="(item,index) in detailData.tranCarInfoList2">
- <!-- 车号 -->
- <view class="c-row">
- <view class="title">车号</view>
- <view class="con-list">
- <input v-model='item.carNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 车厢号 -->
- <view class="c-row">
- <view class="title">车厢号-1</view>
- <view class="con-list">
- <input v-model='item.boxNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <view class="c-row">
- <view class="title">车厢号-2</view>
- <view class="con-list">
- <input v-model='item.boxNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 装车净重 -->
- <view class="c-row">
- <view class="title">装车净重(吨)</view>
- <view class="con-list">
- <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 卸车净重 -->
- <view class="c-row">
- <view class="title">卸车净重(吨)</view>
- <view class="con-list">
- <input v-model='item.unloadNetWeight' placeholder="请输入卸车净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
- </view>
- </view>
- <view class="flex">
- <!-- <u-button @click='pass(2,index)' v-if="item.status != '已送达'" type="success" hover-class='none'>保存</u-button> -->
- <view class="btn" @click='pass(2,index)'v-if="item.status != '已送达'">保存</view>
- </view>
- </view>
- <!-- 以上火运反馈 -->
- <!-- 散船反馈 -->
- <view class="flex title_css">
- <view class="head_css">散船反馈({{shipList?shipList:0}})<image :src="shipurl" class="open_css" @click="shipping">
- </image>
- </view>
- </view>
- <view class="content" v-if="shipShow" v-for="(item,index) in detailData.tranCarInfoList3">
- <!-- 船名 -->
- <view class="c-row">
- <view class="title">船名</view>
- <view class="con-list">
- <input v-model='item.shipName' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <view class="c-row">
- <view class="title">航次</view>
- <view class="con-list">
- <input v-model='item.shipNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 装船净重 -->
- <view class="c-row">
- <view class="title">装船净重(吨)</view>
- <view class="con-list">
- <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 卸船净重 -->
- <view class="c-row">
- <view class="title">装船净重(吨)</view>
- <view class="con-list">
- <input v-model='item.unloadNetWeight' placeholder="请输入卸船净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
- </view>
- </view>
- <view class="flex">
- <!-- <u-button @click='pass(3,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
- <view class="btn" @click='pass(3,index)'v-if="item.status != '已送达'">保存</view>
- </view>
- </view>
- <!-- 以上散船反馈 -->
- <!-- 集装箱船反馈 -->
- <view class="flex title_css">
- <view class="head_css">集装箱船反馈({{containerList?containerList:0}})<image :src="containerUrl" class="open_css"
- @click="containerchange"></image>
- </view>
- </view>
- <view class="content" v-if="containerShow" v-for="(item,index) in detailData.tranCarInfoList4">
- <!-- 箱号 -->
- <view class="c-row">
- <view class="title">箱号</view>
- <view class="con-list">
- <input v-model='item.caseNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <view class="c-row">
- <view class="title">封号</view>
- <view class="con-list">
- <input v-model='item.titleNo' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 装船净重 -->
- <view class="c-row">
- <view class="title">装船净重(吨)</view>
- <view class="con-list">
- <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
- </view>
- </view>
- <!-- 卸船净重 -->
- <view class="c-row">
- <view class="title">卸船净重(吨)</view>
- <view class="con-list">
- <input v-model='item.unloadNetWeight' placeholder="请输入卸船净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
- </view>
- </view>
- <view class="flex">
- <!-- <u-button @click='pass(4,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
- <view class="btn" @click='pass(4,index)'v-if="item.status != '已送达'">保存</view>
- </view>
- </view>
- </view>
- <view style='padding:10px;' class='flex bottom-btn'>
- <u-button @click='finishedgoods' type="success" class="btn2" :disabled="statusAll != '执行中'">完货</u-button>
- </view>
- </view>
- </template>
- <script>
- import upload from '@/components/upload.vue';
- import helper from '@/common/helper.js';
- export default {
- components: {
- upload
- },
- data() {
- return {
- id: '',
- statusAll:"",
- currentPage: 1,
- pageSize: 10,
- maxSize: 50 * 1024 * 1024,
- status: '执行中',
- params: {
- year: true,
- month: true,
- day: true,
- },
- action: this.$uploadUrl, //磅单上传地址
- detailData: {},
- show: false,
- carShow: false,
- carurl: "../../../static/img/authentication/up2.png",
- trainCarShow: false,
- trainCarurl: "../../../static/img/authentication/up2.png",
- shipShow: false,
- shipurl: "../../../static/img/authentication/up2.png",
- containerUrl: "../../../static/img/authentication/up2.png",
- containerShow: false,
- infoId: "",
- sendCar: [], //汽运
- huoYun: [], //火运
- looseShip: [], //散船
- container: [], //集裝箱船
- sendCarList: "",
- trainCarList: "",
- shipList: "",
- containerList: "",
- }
- },
- onLoad(options) {
- this.id = options.id
- this.statusAll = options.status
- },
- onShow() {
- this.getList()
- },
- computed: {},
- methods: {
- //汽运展开显示
- openCar() {
- this.carShow = !this.carShow
- if (this.carShow) {
- this.carurl = "../../../static/img/authentication/down2@2x.png"
- } else {
- this.carurl = "../../../static/img/authentication/up2.png"
- }
- },
- // 火运展开显示
- trainCar() {
- this.trainCarShow = !this.trainCarShow
- if (this.trainCarShow) {
- this.trainCarurl = "../../../static/img/authentication/down2@2x.png"
- } else {
- this.trainCarurl = "../../../static/img/authentication/up2.png"
- }
- },
- //船运展开显示
- shipping() {
- this.shipShow = !this.shipShow
- if (this.shipShow) {
- this.shipurl = "../../../static/img/authentication/down2@2x.png"
- } else {
- this.shipurl = "../../../static/img/authentication/up2.png"
- }
- },
- //集装箱船展开显示
- containerchange() {
- this.containerShow = !this.containerShow
- if (this.containerShow) {
- this.containerUrl = "../../../static/img/authentication/down2@2x.png"
- } else {
- this.containerUrl = "../../../static/img/authentication/up2.png"
- }
- },
- //完货
- finishedgoods() {
- for(let i = 0 ; i < this.detailData.tranCarInfoList1.length;i++){
- if(this.detailData.tranCarInfoList1[i].status != "已送达" ){
- this.$api.msg("请完成所有的汽运收货反馈!")
- return
- }
- }
- for(let i = 0 ; i < this.detailData.tranCarInfoList2.length;i++){
- if(this.detailData.tranCarInfoList2[i].status != "已送达"){
- this.$api.msg("请完成所有的火运收货反馈!")
- return
- }
- }
- for(let i = 0 ; i < this.detailData.tranCarInfoList3.length;i++){
- if(this.detailData.tranCarInfoList3[i].status != "已送达"){
- this.$api.msg("请完成所有的散船收货反馈!")
- return
- }
- }
- for(let i = 0 ; i < this.detailData.tranCarInfoList4.length;i++){
- if(this.detailData.tranCarInfoList4[i].status != "已送达"){
- this.$api.msg("请完成所有的集装箱船收货反馈!")
- return
- }
- }
- var that = this
- uni.showModal({
- content: "完货操作后,卸车信息不可修改,是否确定完货?",
- success(res) {
- if (res.confirm) {
- let complete = {}
- complete.id = that.id
- that.$api.doRequest('post', '/tranProcessInfo/api/editReceivingStatus', complete).then(res => {
- if (res.data.code == 200) {
- that.sendCar.splice(index, 1)
- that.$api.msg("提交成功")
- setTimeout(() => {
- uni.navigateBack()
- }, 1000)
- } else {
- that.$api.msg(res.data.message)
- }
- })
- }
- }
- })
- },
- //保存
- pass(num, index) {
- if(num == 1){
- if(!this.detailData.tranCarInfoList1[index].unloadNetWeight || this.detailData.tranCarInfoList1[index].unloadNetWeight == 0){
- this.$api.msg("请输入卸车净重")
- return
- }
- }
- if(num == 2){
- if(!this.detailData.tranCarInfoList2[index].unloadNetWeight || this.detailData.tranCarInfoList2[index].unloadNetWeight == 0){
- this.$api.msg("请输入卸车净重")
- return
- }
- }
- if(num == 3){
- if(!this.detailData.tranCarInfoList3[index].unloadNetWeight || this.detailData.tranCarInfoList3[index].unloadNetWeight == 0){
- this.$api.msg("请输入卸船净重")
- return
- }
- }
- if(num == 4){
- if(!this.detailData.tranCarInfoList4[index].unloadNetWeight || this.detailData.tranCarInfoList4[index].unloadNetWeight == 0){
- this.$api.msg("请输入卸船净重")
- return
- }
- }
- var that = this
- uni.showModal({
- content: "确定保存反馈信息?",
- success(res) {
- if (res.confirm) {
- let _pro = {}
- _pro.id = that.id
- _pro.infoId = that.detailData.infoId
- _pro.contractNo = that.detailData.contractNo
- if (num == 1) {
- _pro.tranCarInfoList1 = [that.detailData.tranCarInfoList1[index]]
- _pro.threeTranType = "汽运"
- that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
- if (res.data.code == 200) {
- that.$api.msg("保存成功")
- that.getList()
- } else {
- that.$api.msg(res.data.message)
- }
- })
- } else if (num == 2) {
- _pro.tranCarInfoList2 = [that.detailData.tranCarInfoList2[index]]
- _pro.threeTranType = "火运"
- that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
- if (res.data.code == 200) {
- that.$api.msg("保存成功")
- that.getList()
- } else {
- that.$api.msg(res.data.message)
- }
- })
- } else if (num == 3) {
- _pro.tranCarInfoList3 = [that.detailData.tranCarInfoList3[index]]
- _pro.threeTranType = "散船"
- that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
- if (res.data.code == 200) {
- that.$api.msg("保存成功")
- that.getList()
- } else {
- that.$api.msg(res.data.message)
- }
- })
- } else if (num == 4) {
- _pro.tranCarInfoList4 = [that.detailData.tranCarInfoList4[index]]
- _pro.threeTranType = "集装箱船"
- that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
- if (res.data.code == 200) {
- that.$api.msg("保存成功")
- that.getList()
- } else {
- that.$api.msg(res.data.message)
- }
- })
- }
- }
- }
- })
- },
- getList() {
- this.$api.doRequest('get', '/tranProcessInfo/getThreeTranProcess', {
- id: this.id
- }).then(res => {
- if (res.data.code == 200) {
- this.detailData = res.data.data
- if(this.detailData.tranCarInfoList1){this.sendCarList = this.detailData.tranCarInfoList1.length}
- if(this.detailData.tranCarInfoList2){this.trainCarList = this.detailData.tranCarInfoList2.length}
- if(this.detailData.tranCarInfoList3){this.shipList = this.detailData.tranCarInfoList3.length}
- if(this.detailData.tranCarInfoList4){this.containerList = this.detailData.tranCarInfoList4.length}
- }
- })
- },
- filterFileType(index, lists) {
- if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
- lists.splice(index, 1);
- // 当前文件不支持
- uni.showModal({
- title: '暂不支持当前图片类型',
- showCancel: false
- });
- } else {
- this.isAdd = false;
- }
- },
- }
- }
- </script>
- <style scoped lang="scss">
- uni-page-body {
- overflow: hidden;
- }
- .content {
- margin: 10px 0;
- }
- .wrap {
- margin: 10rpx;
- padding: 20rpx 20rpx 300rpx 20rpx;
- .top {
- display: flex;
- margin-bottom: 20rpx;
- .top-left {
- margin-right: 20rpx;
- }
- }
- }
- .bottom-btn {
- width: 100%;
- position: fixed;
- bottom: 0;
- display: flex;
- z-index: 2;
- left: 0;
- background-color: #f8f8f8;
- flex-direction: column;
- .btn1,
- .btn2 {
- width: 100%;
- margin-bottom: 26rpx;
- border-radius: 90rpx;
- }
- .btn1 {
- background: white;
- color: #00C265;
- }
- }
- .content,
- .content1,
- .content2 {
- border-radius: 20rpx;
- background: white;
- padding: 20rpx;
- .title {
- font-size: 28rpx;
- // font-weight: 600;
- color: #333333;
- }
- .row {
- display: flex;
- justify-content: space-between;
- // border-bottom: 1px solid #EEEEEE;
- padding: 20rpx 0;
- .right,
- input {
- font-size: 28rpx;
- color: #333333;
- }
- }
- .row-bottom {
- // border: 0;
- .right-bottom {
- width: 280rpx;
- text-align: right;
- }
- }
- }
- .content1 {
- margin-top: 20rpx;
- }
- .content2 {
- margin-top: 10px;
- // display: flex;
- align-items: center;
- .left {
- margin-right: 20px;
- }
- }
- .edit-btn {
- background: #22C572;
- width: 100rpx;
- height: 50rpx;
- margin: 0;
- color: white;
- }
- .has-btn {
- align-items: center;
- }
- .shade {
- background: #000;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 10000;
- }
- .pound_list {
- width: 452rpx;
- display: flex;
- justify-content: flex-end;
- text-align: right;
- }
- .c-row {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- padding: 10rpx;
- position: relative;
- }
- .con-list {
- -webkit-box-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-flex-direction: column;
- flex-direction: column;
- color: #303133;
- line-height: 40rpx;
- text-align: right;
- padding-right: 20rpx;
- }
- .btn{
- padding: 10rpx 60rpx;
- border-radius: 40rpx;
- color: #FFFFFF;
- line-height: 46rpx;
- margin: 0 auto;
- background-color: #5ac725;
- }
- .add_css {
- width: 50%;
- display: flex;
- justify-content: flex-end;
- .add {
- padding: 10rpx 20rpx;
- background-color: #5ac725;
- border-radius: 6rpx;
- color: #FFFFFF;
- line-height: 40rpx;
- }
- }
- .open_css {
- width: 36rpx;
- height: 20rpx;
- // top: 4rpx;
- }
- .title_css {
- margin-bottom: 20rpx;
- .head_css {
- margin-left: 20rpx;
- width: 50%;
- line-height: 40rpx;
- margin-bottom: 30rpx;
- }
- }
- </style>
|