2023-07-11 17:29:53 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="shiftAdd">
|
|
|
|
|
<view class="container">
|
|
|
|
|
<uni-steps :options="stepList" :active="active" />
|
|
|
|
|
<view class="line"></view>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<!-- 工班信息 -->
|
|
|
|
|
<template v-if="active == 0">
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<view class="ul ul1">
|
|
|
|
|
<view class="li">
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p>船名:</p>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<text>{{shipInfo.voyageScheduleDataList[0].spmName}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p><text class="required">*</text>航次:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-data-select v-model="hcValue" :localdata="hcList" @change="hcChange"></uni-data-select>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p>进出口:</p>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<text>{{shipInfo.voyageScheduleDataList[0].importExportFlagName}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p>贸易类型:</p>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<text>{{shipInfo.voyageScheduleDataList[0].tradeTypeName}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p><text class="required">*</text>装卸类型:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-data-select v-model="zxValue" :localdata="zxList" @change="zxChange"></uni-data-select>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-24 16:56:46 +08:00
|
|
|
|
<view class="widthLi" v-for="(item,index) in ulList1" :key="index+'ul'">
|
|
|
|
|
<view class="ulTop"><text @click="ulAdd1">添加工班</text><text v-if="index > 0"
|
|
|
|
|
@click="delGb(index)">删除</text><van-icon name="arrow-down" /></view>
|
|
|
|
|
<view class="ul">
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>工班:</p>
|
|
|
|
|
<uni-data-select v-model="item.gbValue" :localdata="gbList"
|
|
|
|
|
@change="gbChange(item,index)"></uni-data-select>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>作业时间 :</p>
|
|
|
|
|
<uni-datetime-picker v-model="item.datetime" type="datetimerange" rangeSeparator="-"
|
|
|
|
|
@change="changeLog(item)" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="widthLi" v-for="(item2,index2) in item.ulList2" :key="index2+'ul2'">
|
|
|
|
|
<view class="ulTop"><text @click="ulAdd2(index)">添加工班信息</text></text><text v-if="index2 > 0"
|
|
|
|
|
@click="delGb2(index,index2)">删除</text><van-icon name="arrow-down" /></view>
|
|
|
|
|
<view class="ul">
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>车型:</p>
|
|
|
|
|
<uni-data-select v-model="item2.cxValue" :localdata="cxList"
|
|
|
|
|
@change="cxChange(item,index,item2,index2)"></uni-data-select>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p><text class="required">*</text>数量:</p>
|
|
|
|
|
<uni-number-box @change="numChange" v-model="item2.numValue" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>装卸方式:</p>
|
|
|
|
|
<uni-data-select v-model="item2.fsValue" :localdata="fsList"
|
|
|
|
|
@change="fsChange(item,index,item2,index2)"></uni-data-select>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="li widthLi">
|
|
|
|
|
<p class="liTitle">备注:</p>
|
|
|
|
|
<uni-easyinput type="textarea" autoHeight v-model="item2.notes"
|
|
|
|
|
placeholder="请输入任务描述(200字以内)" maxlength="200"></uni-easyinput>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- 翻仓信息 -->
|
|
|
|
|
<template v-if="active == 1">
|
|
|
|
|
<view v-for="(item,index) in fcUlList" :key="index + 'fc'">
|
2023-07-24 16:56:46 +08:00
|
|
|
|
<view class="ulTop"><text @click="fcAdd">添加翻仓类型</text><text v-if="index > 0"
|
|
|
|
|
@click="delFc(index)">删除</text><van-icon name="arrow-down" /></view>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<view class="ul fcUl">
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>翻仓类型:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-data-select v-model="item.fcValue" :localdata="fcList"
|
2023-07-19 18:12:19 +08:00
|
|
|
|
@change="fcChange(item,index)"></uni-data-select>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<view v-for="(item2,index2) in item.fcUlList2" :key="index2 + 'fc2'">
|
2023-07-24 16:56:46 +08:00
|
|
|
|
<view class="ulTop"><text @click="fcAdd2(index)">添加翻仓信息</text></text><text v-if="index2 > 0"
|
|
|
|
|
@click="delFc2(index,index2)">删除</text><van-icon name="arrow-down" /></view>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<view class="ul ul2 fcUl2">
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>翻舱起点位置:</p>
|
2023-07-19 18:12:19 +08:00
|
|
|
|
<uni-easyinput v-model="item2.qdValue" placeholder="请输入翻舱起点位置"></uni-easyinput>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>翻舱终点位置:</p>
|
2023-07-19 18:12:19 +08:00
|
|
|
|
<uni-easyinput v-model="item2.zdValue" placeholder="请输入翻舱终点位置"></uni-easyinput>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>工班:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-data-select v-model="item2.gbValue" :localdata="gbList"
|
2023-07-19 18:12:19 +08:00
|
|
|
|
@change="fcgbChange(index,item2,index2)"></uni-data-select>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>作业时间 :</p>
|
2023-07-19 18:12:19 +08:00
|
|
|
|
<uni-datetime-picker v-model="item2.datetime" type="datetimerange" rangeSeparator="-"
|
|
|
|
|
@change="changeLog(item2)" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>数量:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-number-box v-model="item2.numValue" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>体积:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-number-box v-model="item2.tjValue" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>重量:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-number-box v-model="item2.zlValue" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- 其他信息 -->
|
|
|
|
|
<template v-if="active == 2">
|
|
|
|
|
<view class="otherWork">
|
|
|
|
|
<p class="title">辅助作业</p>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<view class="ul">
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>技术工人:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-number-box v-model="otherObj.jsWorker" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>普通工人:</p>
|
2023-07-19 18:12:19 +08:00
|
|
|
|
<uni-number-box v-model="otherObj.ptworker" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>作业时间 :</p>
|
2023-07-19 18:12:19 +08:00
|
|
|
|
<uni-datetime-picker v-model="otherObj.datetime" type="datetimerange" rangeSeparator="-"
|
|
|
|
|
@change="changeLog(otherObj)" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>重量:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-number-box v-model="otherObj.zlValue" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
|
|
|
|
<p class="liTitle"><text class="required">*</text>体积:</p>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<uni-number-box v-model="otherObj.tjValue" />
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="li">
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p class="liTitle">描述:</p>
|
|
|
|
|
<uni-easyinput type="textarea" autoHeight v-model="otherObj.describe"
|
|
|
|
|
placeholder="请输入任务描述(200字以内)" maxlength="200"></uni-easyinput>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p class="title">待工作业</p>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<view class="ul">
|
|
|
|
|
<view class="li">
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p class="liTitle">描述:</p>
|
|
|
|
|
<uni-easyinput type="textarea" autoHeight v-model="otherObj.dgWork"
|
|
|
|
|
placeholder="请输入任务描述(200字以内)" maxlength="200"></uni-easyinput>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p class="title">作业备注</p>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
<view class="ul">
|
|
|
|
|
<view class="li">
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<p class="liTitle">描述:</p>
|
|
|
|
|
<uni-easyinput type="textarea" autoHeight v-model="otherObj.notes"
|
|
|
|
|
placeholder="请输入任务描述(200字以内)" maxlength="200"></uni-easyinput>
|
2023-07-18 17:37:15 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
2023-07-11 17:29:53 +08:00
|
|
|
|
<view class="btnList">
|
|
|
|
|
<van-button type="default" @click="cancel">取消</van-button>
|
2023-07-19 18:12:19 +08:00
|
|
|
|
<van-button type="info" @click="back" v-if="active > 0">上一步</van-button>
|
|
|
|
|
<van-button type="info" @click="save" v-if="active == 2">保存</van-button>
|
2023-07-12 13:48:01 +08:00
|
|
|
|
<van-button type="info" @click="next" v-if="active < 2">下一步</van-button>
|
2023-07-11 17:29:53 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-07-18 17:37:15 +08:00
|
|
|
|
shipInfo: {
|
|
|
|
|
voyageScheduleDataList: [{
|
|
|
|
|
spmName: "",
|
|
|
|
|
importExportFlagName: "",
|
|
|
|
|
tradeTypeName: ""
|
|
|
|
|
}]
|
|
|
|
|
},
|
2023-07-11 17:29:53 +08:00
|
|
|
|
obj: {},
|
2023-07-19 18:12:19 +08:00
|
|
|
|
dataInfo: {},
|
|
|
|
|
shiftRowIndex: 0,
|
2023-07-11 17:29:53 +08:00
|
|
|
|
active: 0,
|
|
|
|
|
stepList: [{
|
2023-07-18 17:37:15 +08:00
|
|
|
|
title: '工班信息'
|
2023-07-11 17:29:53 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-07-18 17:37:15 +08:00
|
|
|
|
title: '翻舱信息'
|
2023-07-11 17:29:53 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-07-18 17:37:15 +08:00
|
|
|
|
title: '其他信息'
|
|
|
|
|
}
|
2023-07-11 17:29:53 +08:00
|
|
|
|
],
|
2023-07-18 17:37:15 +08:00
|
|
|
|
|
|
|
|
|
// 工班信息
|
|
|
|
|
// 航次下拉框
|
|
|
|
|
hcValue: "",
|
|
|
|
|
hcTextValue: "",
|
|
|
|
|
hcList: [],
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 装卸类型下拉框
|
|
|
|
|
zxValue: "",
|
2023-07-18 17:37:15 +08:00
|
|
|
|
zxTextValue: "",
|
|
|
|
|
zxList: [],
|
2023-07-12 13:48:01 +08:00
|
|
|
|
ulList1: [{
|
|
|
|
|
gbValue: "",
|
2023-07-19 18:12:19 +08:00
|
|
|
|
gbTextValue: "",
|
|
|
|
|
datetime: ['', ''],
|
|
|
|
|
startTime: "",
|
|
|
|
|
endTime: "",
|
2023-07-24 16:56:46 +08:00
|
|
|
|
ulList2: [{
|
|
|
|
|
cxValue: "",
|
|
|
|
|
cxTextValue: "",
|
|
|
|
|
numValue: 0,
|
|
|
|
|
fsValue: "",
|
|
|
|
|
fsTextValue: "",
|
|
|
|
|
notes: "",
|
|
|
|
|
}],
|
2023-07-12 13:48:01 +08:00
|
|
|
|
}],
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 工班下拉框
|
2023-07-19 18:12:19 +08:00
|
|
|
|
gbList: [],
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 车型下拉
|
2023-07-19 18:12:19 +08:00
|
|
|
|
cxList: [],
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 装卸方式下拉
|
2023-07-19 18:12:19 +08:00
|
|
|
|
fsList: [],
|
2023-07-12 13:48:01 +08:00
|
|
|
|
|
|
|
|
|
// 翻仓信息
|
|
|
|
|
// 翻仓类型下拉
|
2023-07-20 17:16:08 +08:00
|
|
|
|
fcList: [],
|
2023-07-12 13:48:01 +08:00
|
|
|
|
fcUlList: [{
|
|
|
|
|
fcValue: "",
|
2023-07-19 18:12:19 +08:00
|
|
|
|
fcTextValue: "",
|
2023-07-12 13:48:01 +08:00
|
|
|
|
fcUlList2: [{
|
|
|
|
|
qdValue: "",
|
|
|
|
|
zdValue: "",
|
|
|
|
|
gbValue: "",
|
2023-07-19 18:12:19 +08:00
|
|
|
|
gbTextValue: "",
|
|
|
|
|
datetime: ['', ''],
|
|
|
|
|
startTime: "",
|
|
|
|
|
endTime: "",
|
2023-07-12 13:48:01 +08:00
|
|
|
|
numValue: 0,
|
|
|
|
|
tjValue: 0,
|
|
|
|
|
zlValue: 0
|
|
|
|
|
}],
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
// 其他信息
|
|
|
|
|
otherObj: {
|
|
|
|
|
jsWorker: 0,
|
|
|
|
|
ptworker: 0,
|
2023-07-19 18:12:19 +08:00
|
|
|
|
datetime: ['', ''],
|
|
|
|
|
startTime: "",
|
|
|
|
|
endTime: "",
|
2023-07-12 13:48:01 +08:00
|
|
|
|
zlValue: 0,
|
|
|
|
|
tjValue: 0,
|
|
|
|
|
describe: "",
|
|
|
|
|
dgWork: "",
|
|
|
|
|
notes: "",
|
|
|
|
|
}
|
2023-07-11 17:29:53 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
if ('params' in options) {
|
|
|
|
|
// 获取传递的对象参数,使用decodeURIComponent解码,并转为对象
|
|
|
|
|
this.obj = JSON.parse(decodeURIComponent(options.params))
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-07-18 17:37:15 +08:00
|
|
|
|
mounted() {
|
2023-07-19 18:12:19 +08:00
|
|
|
|
if (this.obj.state == 'edit') {
|
|
|
|
|
this.editData();
|
|
|
|
|
}
|
2023-07-20 17:16:08 +08:00
|
|
|
|
this.getShip()
|
2023-07-18 17:37:15 +08:00
|
|
|
|
},
|
2023-07-11 17:29:53 +08:00
|
|
|
|
methods: {
|
2023-07-18 17:37:15 +08:00
|
|
|
|
// 获取船只信息
|
|
|
|
|
getShip() {
|
|
|
|
|
this.shipInfo = uni.getStorageSync('shipInfo')
|
2023-07-19 18:12:19 +08:00
|
|
|
|
// 航次数据
|
2023-07-18 17:37:15 +08:00
|
|
|
|
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
|
|
|
|
|
this.hcList.push({
|
|
|
|
|
text: v.vvyName,
|
|
|
|
|
value: v.vvyId
|
|
|
|
|
})
|
|
|
|
|
})
|
2023-07-19 18:12:19 +08:00
|
|
|
|
// 装卸类型数据
|
2023-07-18 17:37:15 +08:00
|
|
|
|
this.shipInfo.handTypeList.forEach((v, index) => {
|
|
|
|
|
this.zxList.push({
|
|
|
|
|
text: v.ptrDesc,
|
|
|
|
|
value: v.ptrCode
|
|
|
|
|
})
|
|
|
|
|
})
|
2023-07-19 18:12:19 +08:00
|
|
|
|
// 工班数据
|
|
|
|
|
this.shipInfo.shipmentBasicShiftList.forEach((v, index) => {
|
|
|
|
|
this.gbList.push({
|
|
|
|
|
text: v.pwcTypeDesc,
|
|
|
|
|
value: v.pwcId
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// 车型数据
|
|
|
|
|
this.shipInfo.shipmentVehicleModeList.forEach((v, index) => {
|
|
|
|
|
this.cxList.push({
|
|
|
|
|
text: v.bvmName,
|
|
|
|
|
value: v.bvmId
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// 装卸方式
|
|
|
|
|
this.shipInfo.loadTypeList.forEach((v, index) => {
|
|
|
|
|
this.fsList.push({
|
|
|
|
|
text: v.ptrDesc,
|
|
|
|
|
value: v.ptrCode
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// 翻仓类型
|
2023-07-20 17:16:08 +08:00
|
|
|
|
this.shipInfo.turnoverTypeList.forEach((v, index) => {
|
2023-07-19 18:12:19 +08:00
|
|
|
|
this.fcList.push({
|
2023-07-20 17:16:08 +08:00
|
|
|
|
text: v.ptrDesc,
|
|
|
|
|
value: v.ptrCode
|
|
|
|
|
|
2023-07-19 18:12:19 +08:00
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//状态为编辑获取数据
|
|
|
|
|
editData() {
|
|
|
|
|
this.dataInfo = uni.getStorageSync('shiftRow')
|
|
|
|
|
this.shiftRowIndex = uni.getStorageSync('shiftRowIndex')
|
|
|
|
|
this.hcValue = this.dataInfo.vvyId
|
|
|
|
|
this.hcTextValue = this.dataInfo.vvyName
|
2023-08-01 09:32:45 +08:00
|
|
|
|
this.zxValue = this.dataInfo.loadType
|
2023-07-19 18:12:19 +08:00
|
|
|
|
this.zxTextValue = this.dataInfo.zxTextValue
|
|
|
|
|
this.ulList1 = this.dataInfo.shiftList
|
|
|
|
|
this.fcUlList = this.dataInfo.fcList
|
|
|
|
|
this.otherObj = this.dataInfo.otherList
|
2023-07-18 17:37:15 +08:00
|
|
|
|
},
|
2023-07-12 13:48:01 +08:00
|
|
|
|
// 工班信息相关
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 航次下拉
|
|
|
|
|
hcChange(e) {
|
|
|
|
|
this.hcValue = e;
|
2023-07-18 17:37:15 +08:00
|
|
|
|
this.hcList.forEach(v => {
|
|
|
|
|
if (v.value == e) {
|
|
|
|
|
this.hcTextValue = v.text
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-07-11 17:29:53 +08:00
|
|
|
|
},
|
|
|
|
|
// 装卸类型下拉
|
|
|
|
|
zxChange(e) {
|
|
|
|
|
this.zxValue = e;
|
2023-07-18 17:37:15 +08:00
|
|
|
|
this.zxList.forEach(v => {
|
|
|
|
|
if (v.value == e) {
|
|
|
|
|
this.zxTextValue = v.text
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-07-11 17:29:53 +08:00
|
|
|
|
},
|
2023-07-24 16:56:46 +08:00
|
|
|
|
// 工班信息添加
|
2023-07-11 17:29:53 +08:00
|
|
|
|
ulAdd1() {
|
2023-07-12 13:48:01 +08:00
|
|
|
|
this.ulList1.push({
|
2023-07-19 18:12:19 +08:00
|
|
|
|
datetime: ['', ''],
|
2023-07-12 13:48:01 +08:00
|
|
|
|
gbValue: "",
|
2023-07-24 16:56:46 +08:00
|
|
|
|
gbTextValue: "",
|
|
|
|
|
ulList2: [{
|
|
|
|
|
cxValue: "",
|
|
|
|
|
cxTextValue: "",
|
|
|
|
|
numValue: 0,
|
|
|
|
|
fsValue: "",
|
|
|
|
|
fsTextValue: "",
|
|
|
|
|
notes: "",
|
|
|
|
|
}],
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
ulAdd2(index) {
|
|
|
|
|
this.ulList1[index].ulList2.push({
|
|
|
|
|
cxValue: "",
|
|
|
|
|
numValue: 0,
|
|
|
|
|
fsValue: "",
|
|
|
|
|
notes: "",
|
2023-07-12 13:48:01 +08:00
|
|
|
|
})
|
2023-07-11 17:29:53 +08:00
|
|
|
|
},
|
|
|
|
|
// 工班下拉
|
2023-07-19 18:12:19 +08:00
|
|
|
|
gbChange(item, index) {
|
|
|
|
|
this.ulList1[index].gbValue = item.gbValue
|
|
|
|
|
this.gbList.forEach(v => {
|
|
|
|
|
if (v.value == item.gbValue) {
|
|
|
|
|
item.gbTextValue = v.text
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 作业时间
|
2023-07-19 18:12:19 +08:00
|
|
|
|
changeLog(item) {
|
|
|
|
|
item.startTime = item.datetime[0].slice(0, item.datetime[0].length - 3)
|
|
|
|
|
item.endTime = item.datetime[1].slice(0, item.datetime[1].length - 3)
|
|
|
|
|
},
|
2023-07-24 16:56:46 +08:00
|
|
|
|
// 工班信息删除
|
|
|
|
|
delGb(index) {
|
|
|
|
|
this.ulList1.splice(index, 1)
|
2023-07-11 17:29:53 +08:00
|
|
|
|
},
|
2023-07-24 16:56:46 +08:00
|
|
|
|
delGb2(index, index2) {
|
|
|
|
|
this.ulList1[index].ulList2.splice(index2, 1)
|
2023-07-11 17:43:29 +08:00
|
|
|
|
},
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 车型下拉
|
2023-07-24 16:56:46 +08:00
|
|
|
|
cxChange(item, index, item2, index2) {
|
|
|
|
|
this.ulList1[index].ulList2[index2].cxValue = item2.cxValue
|
2023-07-19 18:12:19 +08:00
|
|
|
|
this.cxList.forEach(v => {
|
2023-07-24 16:56:46 +08:00
|
|
|
|
if (v.value == item2.cxValue) {
|
|
|
|
|
item2.cxTextValue = v.text
|
2023-07-19 18:12:19 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 数量
|
2023-07-12 13:48:01 +08:00
|
|
|
|
numChange(val) {},
|
2023-07-11 17:29:53 +08:00
|
|
|
|
// 装卸方式下拉
|
2023-07-24 16:56:46 +08:00
|
|
|
|
fsChange(item, index, item2, index2) {
|
|
|
|
|
this.ulList1[index].ulList2[index2].fsValue = item2.fsValue
|
2023-07-19 18:12:19 +08:00
|
|
|
|
this.fsList.forEach(v => {
|
2023-07-24 16:56:46 +08:00
|
|
|
|
if (v.value == item2.fsValue) {
|
|
|
|
|
item2.fsTextValue = v.text
|
2023-07-19 18:12:19 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-07-12 13:48:01 +08:00
|
|
|
|
|
|
|
|
|
// 翻仓信息
|
|
|
|
|
// 翻仓类型下拉
|
2023-07-19 18:12:19 +08:00
|
|
|
|
fcChange(item, index) {
|
|
|
|
|
this.fcUlList[index].fcValue = item.fcValue
|
|
|
|
|
this.fcList.forEach(v => {
|
|
|
|
|
if (v.value == item.fcValue) {
|
|
|
|
|
item.fcTextValue = v.text
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 翻仓工班
|
|
|
|
|
fcgbChange(index, item2, index2) {
|
|
|
|
|
this.fcUlList[index].fcUlList2[index2].gbValue = item2.gbValue
|
|
|
|
|
this.gbList.forEach(v => {
|
|
|
|
|
if (v.value == item2.gbValue) {
|
|
|
|
|
item2.gbTextValue = v.text
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-07-12 13:48:01 +08:00
|
|
|
|
// 翻仓add
|
|
|
|
|
fcAdd() {
|
|
|
|
|
this.fcUlList.push({
|
|
|
|
|
fcValue: "",
|
2023-07-19 18:12:19 +08:00
|
|
|
|
fcTextValue: "",
|
2023-07-12 13:48:01 +08:00
|
|
|
|
fcUlList2: [{
|
|
|
|
|
qdValue: "",
|
|
|
|
|
zdValue: "",
|
|
|
|
|
gbValue: "",
|
2023-07-19 18:12:19 +08:00
|
|
|
|
gbTextValue: "",
|
|
|
|
|
datetime: ['', ''],
|
|
|
|
|
startTime: "",
|
|
|
|
|
endTime: "",
|
|
|
|
|
numValue: 0,
|
|
|
|
|
tjValue: 0,
|
|
|
|
|
zlValue: 0
|
|
|
|
|
}],
|
2023-07-12 13:48:01 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
fcAdd2(index) {
|
|
|
|
|
this.fcUlList[index].fcUlList2.push({
|
|
|
|
|
qdValue: "",
|
|
|
|
|
zdValue: "",
|
|
|
|
|
gbValue: "",
|
2023-07-19 18:12:19 +08:00
|
|
|
|
gbTextValue: "",
|
|
|
|
|
datetime: ['', ''],
|
|
|
|
|
startTime: "",
|
|
|
|
|
endTime: "",
|
2023-07-12 13:48:01 +08:00
|
|
|
|
numValue: 0,
|
|
|
|
|
tjValue: 0,
|
|
|
|
|
zlValue: 0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 翻仓删除
|
2023-07-24 16:56:46 +08:00
|
|
|
|
delFc(index) {
|
|
|
|
|
this.fcUlList.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
delFc2(index, index2) {
|
2023-07-12 13:48:01 +08:00
|
|
|
|
this.fcUlList[index].fcUlList2.splice(index2, 1)
|
2023-07-11 17:29:53 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 取消
|
|
|
|
|
cancel() {
|
2023-07-26 14:34:20 +08:00
|
|
|
|
uni.setStorageSync('tabsType', 1);
|
2023-07-11 17:29:53 +08:00
|
|
|
|
uni.navigateTo({
|
2023-07-26 14:34:20 +08:00
|
|
|
|
url: '/pages/shipWork/mixWork'
|
2023-07-11 17:29:53 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
2023-07-19 18:12:19 +08:00
|
|
|
|
// 上一步
|
|
|
|
|
back() {
|
|
|
|
|
this.active = this.active - 1
|
|
|
|
|
},
|
2023-07-12 13:48:01 +08:00
|
|
|
|
// 下一步
|
|
|
|
|
next() {
|
|
|
|
|
this.active = this.active + 1
|
|
|
|
|
},
|
2023-07-19 18:12:19 +08:00
|
|
|
|
// 保存
|
|
|
|
|
save() {
|
|
|
|
|
let addShiftArr = uni.getStorageSync('addShiftArr')
|
|
|
|
|
let addShiftObj = {
|
|
|
|
|
vvyName: this.hcTextValue,
|
|
|
|
|
vvyId: this.hcValue,
|
2023-08-01 09:32:45 +08:00
|
|
|
|
loadTypeName: this.zxTextValue,
|
|
|
|
|
loadType: this.zxValue,
|
2023-07-19 18:12:19 +08:00
|
|
|
|
shiftList: this.ulList1,
|
|
|
|
|
fcList: this.fcUlList,
|
|
|
|
|
otherList: this.otherObj
|
|
|
|
|
}
|
|
|
|
|
if (this.obj.state == 'add') {
|
|
|
|
|
if (addShiftArr != "") {
|
|
|
|
|
addShiftArr.push(addShiftObj)
|
|
|
|
|
uni.setStorageSync('addShiftArr', addShiftArr);
|
|
|
|
|
} else {
|
|
|
|
|
addShiftArr = []
|
|
|
|
|
addShiftArr.push(addShiftObj)
|
|
|
|
|
uni.setStorageSync('addShiftArr', addShiftArr);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
addShiftArr[this.shiftRowIndex] = addShiftObj;
|
|
|
|
|
uni.setStorageSync('addShiftArr', addShiftArr);
|
|
|
|
|
}
|
2023-07-26 14:34:20 +08:00
|
|
|
|
uni.setStorageSync('tabsType', 1);
|
2023-07-19 18:12:19 +08:00
|
|
|
|
uni.navigateTo({
|
2023-07-26 14:34:20 +08:00
|
|
|
|
url: '/pages/shipWork/mixWork'
|
2023-07-19 18:12:19 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
2023-08-01 09:32:45 +08:00
|
|
|
|
onBackPress(event) {
|
|
|
|
|
uni.setStorageSync('tabsType', 1);
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/shipWork/mixWork'
|
|
|
|
|
})
|
|
|
|
|
return true;
|
|
|
|
|
},
|
2023-07-11 17:29:53 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.shiftAdd {
|
|
|
|
|
.container {
|
|
|
|
|
padding: 30px 20px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
|
|
/deep/.uni-steps__row-title {
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/.uni-icons {
|
|
|
|
|
font-size: 20px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/.uni-steps__row-container {
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.line {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 10px;
|
|
|
|
|
background: #f2f2f2;
|
2023-07-12 13:48:01 +08:00
|
|
|
|
margin: 20px 0;
|
2023-07-11 17:29:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ulTop {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
border-top: 1px solid #ccc;
|
|
|
|
|
|
|
|
|
|
|
2023-07-18 17:37:15 +08:00
|
|
|
|
text {
|
2023-07-11 17:29:53 +08:00
|
|
|
|
color: #2979ff;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
2023-07-11 17:43:29 +08:00
|
|
|
|
|
2023-07-18 17:37:15 +08:00
|
|
|
|
text:nth-of-type(2) {
|
2023-07-11 17:43:29 +08:00
|
|
|
|
color: red;
|
|
|
|
|
}
|
2023-07-11 17:29:53 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-12 13:48:01 +08:00
|
|
|
|
.fcUl {
|
2023-07-18 17:37:15 +08:00
|
|
|
|
.li {
|
2023-07-12 13:48:01 +08:00
|
|
|
|
border: none;
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
|
|
|
|
.liTitle {
|
|
|
|
|
width: 120px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fcUl2 {
|
|
|
|
|
.liTitle {
|
|
|
|
|
width: 120px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-18 17:37:15 +08:00
|
|
|
|
.ul {
|
2023-07-11 17:29:53 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: space-between;
|
2023-07-12 13:48:01 +08:00
|
|
|
|
margin-bottom: 20px;
|
2023-07-11 17:29:53 +08:00
|
|
|
|
|
2023-07-18 17:37:15 +08:00
|
|
|
|
.li {
|
2023-07-11 17:29:53 +08:00
|
|
|
|
width: 44%;
|
|
|
|
|
border-top: 1px solid #ccc;
|
|
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
|
|
display: flex;
|
|
|
|
|
padding: 10px 20px;
|
|
|
|
|
line-height: 35px;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
|
|
|
|
.required {
|
|
|
|
|
color: red;
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.liTitle {
|
|
|
|
|
min-width: 85px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/.uni-numbox {
|
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/.uni-numbox-btns {
|
|
|
|
|
border-right: 1px solid #ccc;
|
|
|
|
|
border-left: 1px solid #ccc;
|
|
|
|
|
padding: 0 14px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/.uni-numbox__value {
|
|
|
|
|
width: 100px;
|
|
|
|
|
height: 35px;
|
|
|
|
|
line-height: 35px;
|
|
|
|
|
background-color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.widthLi {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ul2 {
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
2023-07-18 17:37:15 +08:00
|
|
|
|
.li {
|
2023-07-11 17:29:53 +08:00
|
|
|
|
border: none;
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-12 13:48:01 +08:00
|
|
|
|
.otherWork {
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
border-left: 5px solid #2979ff;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-18 17:37:15 +08:00
|
|
|
|
.ul {
|
|
|
|
|
.li {
|
2023-07-12 13:48:01 +08:00
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-18 17:37:15 +08:00
|
|
|
|
.li:last-child {
|
2023-07-12 13:48:01 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-11 17:29:53 +08:00
|
|
|
|
.btnList {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
2023-07-12 13:48:01 +08:00
|
|
|
|
margin-top: 20px;
|
2023-07-11 17:29:53 +08:00
|
|
|
|
|
|
|
|
|
/deep/ .van-button {
|
|
|
|
|
margin: 30px 20px;
|
|
|
|
|
width: 120px;
|
|
|
|
|
height: 50px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|