diff --git a/pages/shipWork/documentList.vue b/pages/shipWork/documentList.vue
index 9dbf24c..00a8e2e 100644
--- a/pages/shipWork/documentList.vue
+++ b/pages/shipWork/documentList.vue
@@ -2,19 +2,19 @@
作业单证
-
+
+
其他作业
-
+
+
@@ -23,8 +23,6 @@
export default {
data() {
return {
- // 当前船的信息
- shipInfo: {},
infoList: [{
name: "杂项作业单",
url: "mixWork"
@@ -79,22 +77,18 @@
url: "brandDetails"
}
],
+ shipInfo: []
}
},
- onLoad(options) {
- if ('params' in options) {
- // 获取传递的对象参数,使用decodeURIComponent解码,并转为对象
- this.shipInfo = JSON.parse(decodeURIComponent(options.params))
- }
- console.log(this.shipInfo)
+ mounted() {
+ this.shipInfo = uni.getStorageSync('shipInfo')
},
methods: {
toGo(url) {
- const params = encodeURIComponent(JSON.stringify(this.shipInfo));
uni.navigateTo({
- url: `/pages/shipWork/${url}?params=${params}`
+ url: `/pages/shipWork/${url}`
})
- }
+ },
}
}
@@ -109,13 +103,13 @@
font-weight: bold;
}
- ul {
+ .ul {
display: flex;
flex-wrap: wrap;
padding: 20px;
margin-bottom: 20px;
- li {
+ .li {
margin: 10px 20px;
.round {
diff --git a/pages/shipWork/index.vue b/pages/shipWork/index.vue
index a543452..81201c2 100644
--- a/pages/shipWork/index.vue
+++ b/pages/shipWork/index.vue
@@ -137,7 +137,7 @@
console.log('接口返回------', res);
if (res.statusCode === 200) {
this.total = res.data.data.records.length
- const newArr = this.getMapping(res.data.data.records, this.pageSize)
+ let newArr = this.getMapping(res.data.data.records, this.pageSize)
this.itemList = newArr[this.current - 1];
}
}
@@ -234,6 +234,10 @@
method: 'GET', //请求方式,必须为大写
success: (res) => {
console.log('接口返回------', res);
+ if (res.statusCode == 200) {
+ // 存储数据
+ uni.setStorageSync('shipInfo', res.data.data);
+ }
}
})
},
@@ -431,10 +435,8 @@
})
},
toGo(item) {
- const shipInfo = item;
- const params = encodeURIComponent(JSON.stringify(shipInfo));
uni.navigateTo({
- url: `/pages/shipWork/documentList?params=${params}`
+ url: `/pages/shipWork/documentList`
})
}
}
diff --git a/pages/shipWork/mixWork.vue b/pages/shipWork/mixWork.vue
index 47e003e..dddc6bf 100644
--- a/pages/shipWork/mixWork.vue
+++ b/pages/shipWork/mixWork.vue
@@ -6,35 +6,27 @@
@click="tabsClick(item,index)">{{item}}
-
- -
- 航次:{{item.val1}}
-
贸易类型:{{item.val2}}
- 进出口:{{item.val3}}
- 作业组数:{{item.val4}}
- 单船人数:{{item.val5}}
- 状态:{{item.val6}}
-
-
+
+
+ 航次:{{item.vvyName}}
+ 贸易类型:{{item.tradeTypeName}}
+ 进出口:{{item.importExportFlagName}}
+ 作业组数:{{item.workSuite}}
+ 单船人数:{{item.shipPerson}}
+ 状态:未上传
+
+
-
- -
- 航次:{{item.val1}}
-
-
一工班
- 作业时间:2023/09/09 13:00:00
+
+
+ 航次:{{item.vvyName}}
+
+ {{item2.wkdId}}
+ 作业时间:{{item2.workTime}}
-
- 二工班
- 作业时间:2023/09/09 13:00:00
-
-
- 三工班
- 作业时间:2023/09/09 13:00:00
-
- 状态:{{item.val6}}
-
-
+ 状态:未上传
+
+
+ 新增
@@ -45,51 +37,32 @@
export default {
data() {
return {
- // 当前船只信息
- shipInfo: {},
+ shipInfo: [],
tabsList: ["人员信息", "工班信息"],
tabsType: 1, // 1是人员信息 2是工班信息
tabsIndex: 0,
// 人员信息列表
- peopleInfo: [{
- val1: "JK9795799",
- val2: "内贸",
- val3: "进口",
- val4: "100",
- val5: "100",
- val6: "未上传",
- },
- {
- val1: "JK9795799",
- val2: "内贸",
- val3: "进口",
- val4: "100",
- val5: "100",
- val6: "未上传",
- },
- {
- val1: "JK9795799",
- val2: "内贸",
- val3: "进口",
- val4: "100",
- val5: "100",
- val6: "未上传",
- }
- ],
+ peopleInfo: [],
// 工班信息列表
shiftInfo: [{
- val1: "JK9795799",
- val6: "未上传",
+ 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"
+ }]
}, ]
}
},
- onLoad(options) {
- if ('params' in options) {
- // 获取传递的对象参数,使用decodeURIComponent解码,并转为对象
- this.shipInfo = JSON.parse(decodeURIComponent(options.params))
- }
- console.log(this.shipInfo)
+ mounted() {
+ this.shipInfo = uni.getStorageSync('shipInfo')
+ this.peopleInfo = uni.getStorageSync('addPeopleArr');
},
methods: {
tabsClick(item, index) {
@@ -100,9 +73,13 @@
this.tabsType = 2;
}
},
- add(state) {
- this.shipInfo["state"] = state;
- const params = encodeURIComponent(JSON.stringify(this.shipInfo));
+ add(state, item, index) {
+ uni.setStorageSync('peopleRow', item);
+ uni.setStorageSync('peopleRowIndex', index);
+ let obj = {
+ state: state
+ }
+ const params = encodeURIComponent(JSON.stringify(obj));
if (this.tabsType == 1) {
uni.navigateTo({
url: `/pages/shipWork/peopleAdd?params=${params}`
@@ -117,7 +94,7 @@
uni.navigateTo({
url: `/pages/shipWork/shiftDetails`
})
- }
+ },
}
}
@@ -147,10 +124,10 @@
}
}
- ul {
+ .ul {
padding: 20px 0;
- li {
+ .li {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #ccc;
diff --git a/pages/shipWork/peopleAdd.vue b/pages/shipWork/peopleAdd.vue
index e4242ce..fb4d08d 100644
--- a/pages/shipWork/peopleAdd.vue
+++ b/pages/shipWork/peopleAdd.vue
@@ -1,54 +1,57 @@
-
- -
+
+
船名:
- 快乐号
-
- -
-
*航次:
+ {{shipInfo.voyageScheduleDataList[0].spmName}}
+
+
+ *航次:
- CK98796
-
-
+ {{peopleRow.vvyName}}
+
+
进出口:
- 进口
-
-
+ {{shipInfo.voyageScheduleDataList[0].importExportFlagName}}
+
+
贸易类型:
- 内贸
-
-
- *天气:
- 未知
-
-
- *泊位:
+ {{shipInfo.voyageScheduleDataList[0].tradeTypeName}}
+
+
+ *天气:
+
+ {{peopleRow.weatherType}}
+
+
+ *泊位:
- 1泊位
-
-
- *作业组数:
+ {{peopleRow.bthIdName}}
+
+
+ *作业组数:
- 5
-
-
- *单船人数:
+ {{peopleRow.workSuite}}
+
+
+ *单船人数:
- 12
-
-
+ {{peopleRow.shipPerson}}
+
+
作业时间:
- 2020-04-21 00:00 - 2020-04-21 00:00
-
-
+ {{peopleRow.jobStartTime}} - {{peopleRow.jobEndTime}}
+
+
取消
+ 删除
保存
编辑
@@ -60,59 +63,122 @@
export default {
data() {
return {
+ shipInfo: {
+ voyageScheduleDataList: [{
+ spmName: "",
+ importExportFlagName: "",
+ tradeTypeName: ""
+ }]
+ },
+ peopleRow: {},
+ peopleRowIndex: 0,
obj: {},
// 航次下拉框
hcValue: "",
- hcList: [{
- value: 0,
- text: "航次0"
- },
- {
- value: 1,
- text: "航次1"
- },
- {
- value: 2,
- text: "航次2"
- },
- ],
+ hcTextValue: "",
+ hcList: [],
// 泊位下拉框
bwValue: "",
- bwList: [{
- value: 0,
- text: "泊位0"
- },
- {
- value: 1,
- text: "泊位1"
- },
- {
- value: 2,
- text: "泊位2"
- },
- ],
+ bwTextValue: "",
+ bwList: [],
+ // 天气下拉框
+ tqValue: "",
+ tqTextValue: "",
+ tqList: [{
+ value: 0,
+ text: "晴"
+ }, {
+ value: 1,
+ text: "阴"
+ }, {
+ value: 2,
+ text: "雨"
+ }],
// 作业组数
workValue: 0,
// 单船人数
shipValue: 0,
// 作业时间
- datetime: "",
+ datetime: ['', ''],
+ startTime: "",
+ endTime: "",
}
},
onLoad(options) {
if ('params' in options) {
// 获取传递的对象参数,使用decodeURIComponent解码,并转为对象
this.obj = JSON.parse(decodeURIComponent(options.params))
+ console.log(this.obj)
}
},
+ mounted() {
+
+ if (this.obj.state == "edit" || this.obj.state == "look") {
+ this.getRow()
+ }
+ this.getShip()
+ },
methods: {
+ // 获取船只信息
+ getShip() {
+ this.shipInfo = uni.getStorageSync('shipInfo')
+ this.shipInfo.pubBerthesManageRespList.forEach((v, index) => {
+ this.bwList.push({
+ text: v.bthBthnm,
+ value: v.bthId
+ })
+ })
+ this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
+ this.hcList.push({
+ text: v.vvyName,
+ value: v.vvyId
+ })
+ })
+ },
+ // 获取当前行信息
+ 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
+ }
+ },
// 航次下拉
hcChange(e) {
this.hcValue = e;
+ this.hcList.forEach(v => {
+ if (v.value == e) {
+ this.hcTextValue = v.text
+ }
+ })
},
// 泊位下拉
bwChange(e) {
this.bwValue = e;
+ this.bwList.forEach(v => {
+ if (v.value == e) {
+ this.bwTextValue = v.text
+ }
+ })
+ },
+ // 天气下拉
+ tqChange(e) {
+ this.tqValue = e;
+ this.tqList.forEach(v => {
+ if (v.value == e) {
+ this.tqTextValue = v.text
+ }
+ })
},
// 作业组数
workChange(val) {
@@ -125,7 +191,8 @@
// 作业时间
changeLog(e) {
this.datetime = e;
- console.log(e)
+ this.startTime = this.datetime[0].slice(0, this.datetime[0].length - 3)
+ this.endTime = this.datetime[1].slice(0, this.datetime[1].length - 3)
},
// 取消
cancel() {
@@ -133,8 +200,48 @@
url: '/pages/shipWork/mixWork'
})
},
+ // 删除
+ del() {
+ let addPeopleArr = uni.getStorageSync('addPeopleArr')
+ addPeopleArr.splice(this.peopleRowIndex, 1)
+ uni.setStorageSync('addPeopleArr', addPeopleArr);
+ uni.navigateTo({
+ url: '/pages/shipWork/mixWork'
+ })
+ },
// 保存
save() {
+ let addPeopleArr = uni.getStorageSync('addPeopleArr')
+ let addPeopleObj = {
+ bthId: this.bwValue, // 泊位id
+ bthIdName: this.bwTextValue, // 泊位名转义
+ jobStartTime: this.startTime, // 作业开始时间
+ jobEndTime: this.endTime, // 作业结束时间
+ shipPerson: this.shipValue, // 单船人数
+ vvyId: this.hcValue, // 航次id
+ vvyName: this.hcTextValue, // 航次id名
+ weatherId: this.tqValue, // 天气ID
+ weatherType: this.tqTextValue, // 天气类型
+ workSuite: this.workValue, // 作业组数
+ tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName, // 贸易类型
+ importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName, // 进出口
+ spmName: this.shipInfo.voyageScheduleDataList[0].spmName, // 船只名
+ }
+ if (this.obj.state == "edit") {
+ addPeopleArr[this.peopleRowIndex] = addPeopleObj;
+ uni.setStorageSync('addPeopleArr', addPeopleArr);
+ } else if (this.obj.state == "add") {
+ if (addPeopleArr != "") {
+ addPeopleArr.push(addPeopleObj)
+ uni.setStorageSync('addPeopleArr', addPeopleArr);
+ } else {
+ addPeopleArr = []
+ addPeopleArr.push(addPeopleObj)
+ uni.setStorageSync('addPeopleArr', addPeopleArr);
+ }
+
+ }
+
uni.navigateTo({
url: '/pages/shipWork/mixWork'
})
@@ -157,12 +264,12 @@
padding: 30px 20px;
background-color: #fff;
- ul {
+ .ul {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
- li {
+ .li {
width: 44%;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
diff --git a/pages/shipWork/shiftAdd.vue b/pages/shipWork/shiftAdd.vue
index b6e4f73..67b6e43 100644
--- a/pages/shipWork/shiftAdd.vue
+++ b/pages/shipWork/shiftAdd.vue
@@ -5,111 +5,111 @@
-
- -
+
+
船名:
- 快乐号
-
- -
-
*航次:
+ {{shipInfo.voyageScheduleDataList[0].spmName}}
+
+
+ *航次:
-
- -
+
+
进出口:
- 进口
-
- -
+ {{shipInfo.voyageScheduleDataList[0].importExportFlagName}}
+
+
贸易类型:
- 内贸
-
- -
-
*装卸类型:
+ {{shipInfo.voyageScheduleDataList[0].tradeTypeName}}
+
+
+ *装卸类型:
-
-
- 添加
-
- -
-
*工班:
+
+
+ 添加
+
+
+ *工班:
-
- -
-
*作业时间 :
+
+
+ *作业时间 :
-
-
- 添加删除
+
+ 添加删除
-
- -
-
*车型:
+
+
+ *车型:
-
- -
-
*数量:
+
+
+ *数量:
-
- -
-
*装卸方式:
+
+
+ *装卸方式:
-
- -
+
+
备注:
-
-
+
+
- 添加
-
- -
-
*翻仓类型:
+ 添加
+
+
+ *翻仓类型:
-
-
+
+
- 添加删除
-
- -
-
*翻舱起点位置:
+ 添加删除
+
+
+ *翻舱起点位置:
-
- -
-
*翻舱终点位置:
+
+
+ *翻舱终点位置:
-
-
- *工班:
+
+
+ *工班:
-
-
- *作业时间 :
+
+
+ *作业时间 :
-
-
- *数量:
+
+
+ *数量:
-
-
- *体积:
+
+
+ *体积:
-
-
- *重量:
+
+
+ *重量:
-
-
+
+
@@ -118,49 +118,49 @@
辅助作业
-
- -
-
*技术工人:
+
+
+ *技术工人:
-
- -
-
*普通工人:
+
+
+ *普通工人:
-
-
- *作业时间 :
+
+
+ *作业时间 :
-
-
- *重量:
+
+
+ *重量:
-
-
- *体积:
+
+
+ *体积:
-
-
+
+
描述:
-
-
+
+
待工作业
-
+
+
作业备注
-
+
+
@@ -176,47 +176,35 @@
export default {
data() {
return {
+ shipInfo: {
+ voyageScheduleDataList: [{
+ spmName: "",
+ importExportFlagName: "",
+ tradeTypeName: ""
+ }]
+ },
obj: {},
active: 0,
stepList: [{
- title: '工班信息'
- }, {
- title: '翻舱信息'
- }, {
- title: '其他信息'
- }],
+ title: '工班信息'
+ },
+ {
+ title: '翻舱信息'
+ },
+ {
+ title: '其他信息'
+ }
+ ],
// 工班信息
// 航次下拉框
hcValue: "",
- hcList: [{
- value: "航次0",
- text: "航次0"
- },
- {
- value: "航次1",
- text: "航次1"
- },
- {
- value: "航次2",
- text: "航次2"
- },
- ],
+ hcTextValue: "",
+ hcList: [],
// 装卸类型下拉框
zxValue: "",
- zxList: [{
- value: "装卸类型0",
- text: "装卸类型0"
- },
- {
- value: "装卸类型1",
- text: "装卸类型1"
- },
- {
- value: "装卸类型2",
- text: "装卸类型2"
- },
- ],
+ zxTextValue: "",
+ zxList: [],
ulList1: [{
gbValue: "",
dataTime: ""
@@ -317,15 +305,44 @@
this.obj = JSON.parse(decodeURIComponent(options.params))
}
},
+ mounted() {
+ this.getShip()
+ },
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
+ })
+ })
+ },
// 工班信息相关
// 航次下拉
hcChange(e) {
this.hcValue = e;
+ this.hcList.forEach(v => {
+ if (v.value == e) {
+ this.hcTextValue = v.text
+ }
+ })
},
// 装卸类型下拉
zxChange(e) {
this.zxValue = e;
+ this.zxList.forEach(v => {
+ if (v.value == e) {
+ this.zxTextValue = v.text
+ }
+ })
},
// 点击第一个添加
ulAdd1() {
@@ -439,18 +456,18 @@
border-top: 1px solid #ccc;
- span {
+ text {
color: #2979ff;
margin-right: 10px;
}
- span:nth-of-type(2) {
+ text:nth-of-type(2) {
color: red;
}
}
.fcUl {
- li {
+ .li {
border: none;
margin-bottom: 0;
@@ -466,13 +483,13 @@
}
}
- ul {
+ .ul {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 20px;
- li {
+ .li {
width: 44%;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
@@ -521,7 +538,7 @@
padding: 0;
margin-top: 0;
- li {
+ .li {
border: none;
margin-bottom: 0;
}
@@ -538,12 +555,12 @@
margin-bottom: 20px;
}
- ul {
- li {
+ .ul {
+ .li {
border: none;
}
- li:last-child {
+ .li:last-child {
width: 100%;
}
}