diff --git a/App.vue b/App.vue index 87d0b45..1749be1 100644 --- a/App.vue +++ b/App.vue @@ -17,4 +17,16 @@ @import "style/css/main.css"; @import "style/css/flex-main.css"; @import "/style/iconfont.css"; - + + /deep/.uni-select { + background-color: #fff; + } + + /deep/.uni-date-x--border { + background-color: #fff; + } + + /deep/.superwei-combox { + background-color: #fff; + } + \ No newline at end of file diff --git a/pages/shipWork/mixWork.vue b/pages/shipWork/mixWork.vue index dddc6bf..ae710ff 100644 --- a/pages/shipWork/mixWork.vue +++ b/pages/shipWork/mixWork.vue @@ -6,7 +6,7 @@ @click="tabsClick(item,index)">{{item}} - + 航次:{{item.vvyName}}

贸易类型:{{item.tradeTypeName}}

@@ -17,12 +17,12 @@
- - + + 航次:{{item.vvyName}} - -

{{item2.wkdId}}

- 作业时间:{{item2.workTime}} + +

{{item2.gbTextValue}}

+ 作业开始时间:{{item2.startTime}}
状态:未上传
@@ -39,38 +39,35 @@ return { shipInfo: [], tabsList: ["人员信息", "工班信息"], - tabsType: 1, // 1是人员信息 2是工班信息 + tabsType: 0, // 0是人员信息 1是工班信息 tabsIndex: 0, // 人员信息列表 peopleInfo: [], // 工班信息列表 - shiftInfo: [{ - vvyName: "511I", - workMessageDetailReqDTOS: [{ - wkdId: "一工班", - workTime: "2023/09/09 13:00:00" - }, { - wkdId: "二工班", - workTime: "2023/09/09 13:00:00" - }, { - wkdId: "三工班", - workTime: "2023/09/09 13:00:00" - }] - }, ] + shiftInfo: [] } }, mounted() { + this.tabsType = this.$route.query.infoType + if (this.tabsType != 0 || this.tabsType != 1) { + this.tabsType = 0 + this.tabsIndex = 0 + } else { + this.tabsIndex = this.tabsType + } + this.peopleInfo = uni.getStorageSync('addPeopleArr') + this.shiftInfo = uni.getStorageSync('addShiftArr') + console.log(this.shiftInfo) this.shipInfo = uni.getStorageSync('shipInfo') - this.peopleInfo = uni.getStorageSync('addPeopleArr'); }, methods: { tabsClick(item, index) { this.tabsIndex = index; if (item == "人员信息") { - this.tabsType = 1; + this.tabsType = 0; } else { - this.tabsType = 2; + this.tabsType = 1; } }, add(state, item, index) { @@ -80,7 +77,7 @@ state: state } const params = encodeURIComponent(JSON.stringify(obj)); - if (this.tabsType == 1) { + if (this.tabsType == 0) { uni.navigateTo({ url: `/pages/shipWork/peopleAdd?params=${params}` }) @@ -90,7 +87,9 @@ }) } }, - lookShift() { + lookShift(item, index) { + uni.setStorageSync('shiftRow', item); + uni.setStorageSync('shiftRowIndex', index); uni.navigateTo({ url: `/pages/shipWork/shiftDetails` }) diff --git a/pages/shipWork/peopleAdd.vue b/pages/shipWork/peopleAdd.vue index fb4d08d..c428755 100644 --- a/pages/shipWork/peopleAdd.vue +++ b/pages/shipWork/peopleAdd.vue @@ -112,7 +112,6 @@ } }, mounted() { - if (this.obj.state == "edit" || this.obj.state == "look") { this.getRow() } @@ -139,19 +138,17 @@ getRow() { this.peopleRow = uni.getStorageSync('peopleRow'); this.peopleRowIndex = uni.getStorageSync('peopleRowIndex'); - if (this.obj.state == "edit") { - this.hcValue = this.peopleRow.vvyId - this.hcTextValue = this.peopleRow.vvyName - this.tqValue = this.peopleRow.weatherId - this.tqTextValue = this.peopleRow.weatherType - this.bwValue = this.peopleRow.bthId - this.bwTextValue = this.peopleRow.bthIdName - this.workValue = this.peopleRow.workSuite - this.shipValue = this.peopleRow.shipPerson - this.datetime = [this.peopleRow.jobStartTime, this.peopleRow.jobEndTime] - this.startTime = this.peopleRow.jobStartTime - this.endTime = this.peopleRow.jobEndTime - } + this.hcValue = this.peopleRow.vvyId + this.hcTextValue = this.peopleRow.vvyName + this.tqValue = this.peopleRow.weatherId + this.tqTextValue = this.peopleRow.weatherType + this.bwValue = this.peopleRow.bthId + this.bwTextValue = this.peopleRow.bthIdName + this.workValue = this.peopleRow.workSuite + this.shipValue = this.peopleRow.shipPerson + this.datetime = [this.peopleRow.jobStartTime, this.peopleRow.jobEndTime] + this.startTime = this.peopleRow.jobStartTime + this.endTime = this.peopleRow.jobEndTime }, // 航次下拉 hcChange(e) { @@ -197,7 +194,7 @@ // 取消 cancel() { uni.navigateTo({ - url: '/pages/shipWork/mixWork' + url: '/pages/shipWork/mixWork?infoType=0' }) }, // 删除 @@ -206,7 +203,7 @@ addPeopleArr.splice(this.peopleRowIndex, 1) uni.setStorageSync('addPeopleArr', addPeopleArr); uni.navigateTo({ - url: '/pages/shipWork/mixWork' + url: '/pages/shipWork/mixWork?infoType=0' }) }, // 保存 @@ -243,7 +240,7 @@ } uni.navigateTo({ - url: '/pages/shipWork/mixWork' + url: '/pages/shipWork/mixWork?infoType=0' }) }, // 编辑 diff --git a/pages/shipWork/shiftAdd.vue b/pages/shipWork/shiftAdd.vue index 67b6e43..81f3276 100644 --- a/pages/shipWork/shiftAdd.vue +++ b/pages/shipWork/shiftAdd.vue @@ -32,12 +32,12 @@

*工班:

+ @change="gbChange(item,index)">

*作业时间 :

+ @change="changeLog(item)" />
添加删除

*车型:

+ @change="cxChange(item,index)">

*数量:

@@ -55,7 +55,7 @@

*装卸方式:

+ @change="fsChange(item,index)">

备注:

@@ -73,7 +73,7 @@

*翻仓类型:

+ @change="fcChange(item,index)">
@@ -82,20 +82,21 @@

*翻舱起点位置:

- +

*翻舱终点位置:

- +

*工班:

+ @change="fcgbChange(index,item2,index2)">

*作业时间 :

- +

*数量:

@@ -125,11 +126,12 @@

*普通工人:

- +

*作业时间 :

- +

*重量:

@@ -165,7 +167,8 @@ 取消 - 保存 + 上一步 + 保存 下一步
@@ -184,6 +187,8 @@ }] }, obj: {}, + dataInfo: {}, + shiftRowIndex: 0, active: 0, stepList: [{ title: '工班信息' @@ -207,79 +212,52 @@ zxList: [], ulList1: [{ gbValue: "", - dataTime: "" + gbTextValue: "", + datetime: ['', ''], + startTime: "", + endTime: "", }], // 工班下拉框 - gbList: [{ - value: "工班0", - text: "工班0" - }, - { - value: "工班1", - text: "工班1" - }, - { - value: "工班2", - text: "工班2" - }, - ], + gbList: [], ulList2: [{ cxValue: "", + cxTextValue: "", numValue: 0, fsValue: "", + fsTextValue: "", notes: "", }], // 车型下拉 - cxList: [{ - value: "车型0", - text: "车型0" - }, - { - value: "车型1", - text: "车型1" - }, - { - value: "车型2", - text: "车型2" - }, - ], + cxList: [], // 装卸方式下拉 - fsList: [{ - value: "装卸方式0", - text: "装卸方式0" - }, - { - value: "装卸方式1", - text: "装卸方式1" - }, - { - value: "装卸方式2", - text: "装卸方式2" - }, - ], + fsList: [], // 翻仓信息 // 翻仓类型下拉 fcList: [{ - value: "翻仓类型0", + value: "0", text: "翻仓类型0" }, { - value: "翻仓类型1", + value: "1", text: "翻仓类型1" }, { - value: "翻仓类型2", + value: "2", text: "翻仓类型2" }, ], fcUlList: [{ fcValue: "", + fcTextValue: "", fcUlList2: [{ qdValue: "", zdValue: "", gbValue: "", - dataTime: "", + gbTextValue: "", + datetime: ['', ''], + startTime: "", + endTime: "", numValue: 0, tjValue: 0, zlValue: 0 @@ -290,7 +268,9 @@ otherObj: { jsWorker: 0, ptworker: 0, - workTime: "", + datetime: ['', ''], + startTime: "", + endTime: "", zlValue: 0, tjValue: 0, describe: "", @@ -307,23 +287,69 @@ }, mounted() { this.getShip() + if (this.obj.state == 'edit') { + this.editData(); + } }, methods: { // 获取船只信息 getShip() { this.shipInfo = uni.getStorageSync('shipInfo') + // 航次数据 this.shipInfo.voyageScheduleDataList.forEach((v, index) => { this.hcList.push({ text: v.vvyName, value: v.vvyId }) }) + // 装卸类型数据 this.shipInfo.handTypeList.forEach((v, index) => { this.zxList.push({ text: v.ptrDesc, value: v.ptrCode }) }) + // 工班数据 + 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 + }) + }) + // 翻仓类型 + this.shipInfo.retallyMessageRespList.forEach((v, index) => { + this.fcList.push({ + text: v.retallyTypeName, + value: v.retallyType + }) + }) + }, + //状态为编辑获取数据 + editData() { + this.dataInfo = uni.getStorageSync('shiftRow') + this.shiftRowIndex = uni.getStorageSync('shiftRowIndex') + this.hcValue = this.dataInfo.vvyId + this.hcTextValue = this.dataInfo.vvyName + this.zxValue = this.dataInfo.zxId + this.zxTextValue = this.dataInfo.zxTextValue + this.ulList1 = this.dataInfo.shiftList + this.ulList2 = this.dataInfo.shiftList2 + this.fcUlList = this.dataInfo.fcList + this.otherObj = this.dataInfo.otherList }, // 工班信息相关 // 航次下拉 @@ -347,14 +373,26 @@ // 点击第一个添加 ulAdd1() { this.ulList1.push({ + datetime: ['', ''], gbValue: "", - dataTime: "" + gbTextValue: "" + }) }, // 工班下拉 - gbChange(e) {}, + gbChange(item, index) { + this.ulList1[index].gbValue = item.gbValue + this.gbList.forEach(v => { + if (v.value == item.gbValue) { + item.gbTextValue = v.text + } + }) + }, // 作业时间 - changeLog(e) {}, + 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) + }, // 点击第二个添加 ulAdd2() { this.ulList2.push({ @@ -368,28 +406,62 @@ this.ulList2.splice(0, 1) }, // 车型下拉 - cxChange(e) {}, + cxChange(item, index) { + this.ulList2[index].cxValue = item.cxValue + this.cxList.forEach(v => { + if (v.value == item.cxValue) { + item.cxTextValue = v.text + } + }) + }, // 数量 numChange(val) {}, // 装卸方式下拉 - fsChange(e) {}, + fsChange(item, index) { + this.ulList2[index].fsValue = item.fsValue + this.fsList.forEach(v => { + if (v.value == item.fsValue) { + item.fsTextValue = v.text + } + }) + }, // 翻仓信息 // 翻仓类型下拉 - fcChange(e) {}, + 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 + } + }) + }, // 翻仓add fcAdd() { this.fcUlList.push({ fcValue: "", + fcTextValue: "", fcUlList2: [{ qdValue: "", zdValue: "", gbValue: "", - dataTime: "", - numValue: 12, - tjValue: 12, - zlValue: 12 - }] + gbTextValue: "", + datetime: ['', ''], + startTime: "", + endTime: "", + numValue: 0, + tjValue: 0, + zlValue: 0 + }], }) }, fcAdd2(index) { @@ -397,7 +469,10 @@ qdValue: "", zdValue: "", gbValue: "", - dataTime: "", + gbTextValue: "", + datetime: ['', ''], + startTime: "", + endTime: "", numValue: 0, tjValue: 0, zlValue: 0 @@ -411,15 +486,47 @@ // 取消 cancel() { uni.navigateTo({ - url: '/pages/shipWork/mixWork' + url: '/pages/shipWork/mixWork?infoType=1' }) }, - // 保存 - save() {}, + // 上一步 + back() { + this.active = this.active - 1 + }, // 下一步 next() { this.active = this.active + 1 }, + // 保存 + save() { + let addShiftArr = uni.getStorageSync('addShiftArr') + let addShiftObj = { + vvyName: this.hcTextValue, + vvyId: this.hcValue, + zxName: this.zxTextValue, + zxId: this.zxValue, + shiftList: this.ulList1, + shiftList2: this.ulList2, + 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); + } + uni.navigateTo({ + url: '/pages/shipWork/mixWork?infoType=1' + }) + }, } } diff --git a/pages/shipWork/shiftDetails.vue b/pages/shipWork/shiftDetails.vue index 9d979ff..1ce236c 100644 --- a/pages/shipWork/shiftDetails.vue +++ b/pages/shipWork/shiftDetails.vue @@ -3,197 +3,142 @@ -
    -
  • + + +

    船名:

    - 快乐号 -
  • -
  • + {{shipInfo.voyageScheduleDataList[0].spmName}} + +

    航次:

    - JK97065578 -
  • -
  • + {{shipInfo.voyageScheduleDataList[0].vvyName}} + +

    进出口:

    - 进口 -
  • -
  • + {{shipInfo.voyageScheduleDataList[0].importExportFlagName}} + +

    贸易类型:

    - 外贸 -
  • -
  • + {{shipInfo.voyageScheduleDataList[0].tradeTypeName}} + +

    装卸类型:

    - 装货 -
  • -
-
    -
  • + {{dataInfo.zxName}} + + + +

    工班:

    - 一工班 -
  • -
  • + {{item.gbTextValue}} + +

    作业时间:

    - 2023/06/06 12:00 - 023/06/06 13:00 -
  • -
  • + {{item.startTime}} - {{item.endTime}} + + + +

    车型:

    - 轿车 -
  • -
  • + {{item.cxTextValue}} + +

    数量:

    - 100 -
  • -
  • + {{item.numValue}} + +

    备注:

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum - laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin - sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, - nascetur ridiculus mus. Nam -
  • -
  • -

    车型:

    - 备件 -
  • -
  • -

    数量:

    - 100 -
  • -
  • -

    备注:

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum - laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin - sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, - nascetur ridiculus mus. Nam -
  • -
-
    -
  • -

    工班:

    - 二工班 -
  • -
  • -

    作业时间:

    - 2023/06/06 12:00 - 023/06/06 13:00 -
  • -
  • -

    车型:

    - 轿车 -
  • -
  • -

    数量:

    - 100 -
  • -
  • -

    备注:

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum - laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin - sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, - nascetur ridiculus mus. Nam -
  • -
+ {{item.notes}} +
+
- +

翻舱类型:

- 舱内翻 + {{item.fcTextValue}}
-
    -
  • + +

    航次:

    - JK97065578 -
  • -
  • + {{shipInfo.voyageScheduleDataList[0].vvyName}} + +

    翻舱起点:

    - D5H4 -
  • -
  • + {{item2.qdValue}} + +

    翻舱终点:

    - 舱外 -
  • -
  • + {{item2.zdValue}} + +

    作业时间:

    - 2023/06/06 12:00 - 023/06/06 13:00 -
  • -
  • -

    车型:

    - 轿车 -
  • -
  • + {{item2.startTime}} - {{item2.endTime}} + +

    数量:

    - 100 -
  • -
  • + {{item2.numValue}} + +

    体积:

    - 30 -
  • -
  • + {{item2.tjValue}} + +

    重量:

    - 50 -
  • -
- + {{item2.zlValue}} +
+

辅助作业

-
    -
  • + +

    技术工人:

    - 10 -
  • -
  • + {{dataInfo.otherList.jsWorker}} + +

    普通工人:

    - 30 -
  • -
  • + {{dataInfo.otherList.ptworker}} + +

    作业时间:

    - 2023/06/06 12:00 - 023/06/06 13:00 -
  • -
  • + {{dataInfo.otherList.startTime}} - {{dataInfo.otherList.endTime}} + +

    重量:

    - 50 -
  • -
  • + {{dataInfo.otherList.zlValue}} + +

    体积:

    - 30 -
  • -
  • + {{dataInfo.otherList.tjValue}} + +

    描述:

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum - laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin - sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient - montes,nascetur ridiculus mus. Nam -
  • -
+ {{dataInfo.otherList.describe}} +
+

待工作业

-
    -
  • + +

    描述:

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum - laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin - sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient - montes,nascetur ridiculus mus. Nam -
  • -
+ {{dataInfo.otherList.dgWork}} +
+

作业备注

- - + {{dataInfo.otherList.notes}} +
+
取消 - 删除 - 编辑 + 删除 + 编辑 @@ -204,13 +149,24 @@ data() { return { value: 0, - fcList: [{ - infoList: [{}, {}] - }, { - infoList: [{}] - }] + shipInfo: { + voyageScheduleDataList: [{ + spmName: "", + importExportFlagName: "", + tradeTypeName: "" + }] + }, + dataInfo: { + otherList: {} + }, + shiftRowIndex: 0, } }, + mounted() { + this.shipInfo = uni.getStorageSync('shipInfo') + this.dataInfo = uni.getStorageSync('shiftRow') + this.shiftRowIndex = uni.getStorageSync('shiftRowIndex') + }, methods: { changeIndex(e) { // console.log('选中:', e) @@ -218,7 +174,26 @@ // 取消 cancel() { uni.navigateTo({ - url: '/pages/shipWork/mixWork' + url: '/pages/shipWork/mixWork?infoType=1' + }) + }, + // 删除 + del() { + let addShiftArr = uni.getStorageSync('addShiftArr') + addShiftArr.splice(this.shiftRowIndex, 1) + uni.setStorageSync('addShiftArr', addShiftArr); + uni.navigateTo({ + url: '/pages/shipWork/mixWork?infoType=1' + }) + }, + // 编辑 + edit(state) { + this.obj = { + state: state + }; + const params = encodeURIComponent(JSON.stringify(this.obj)); + uni.navigateTo({ + url: `/pages/shipWork/shiftAdd?params=${params}` }) }, } @@ -242,11 +217,11 @@ font-size: 16px; } - ul { + .ul { border-bottom: 1px dashed #ccc; } - ul:last-child { + .ul:last-child { border: none; } } @@ -261,12 +236,18 @@ } } - ul { + .ul[data-v-298cacec] { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + } + + .ul { display: flex; justify-content: space-between; flex-wrap: wrap; - li { + .li { width: 45%; display: flex; padding: 10px 20px; @@ -284,6 +265,10 @@ } } + .bUl { + border-top: 1px solid #999; + } + .btnList { display: flex; justify-content: center; diff --git a/pages/shipWork/untieAdd.vue b/pages/shipWork/untieAdd.vue index 754db5b..34e87ed 100644 --- a/pages/shipWork/untieAdd.vue +++ b/pages/shipWork/untieAdd.vue @@ -1,64 +1,60 @@