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.vvyName}} +

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

+

进出口:{{item.importExportFlagName}}

+

作业组数:{{item.workSuite}}

+

单船人数:{{item.shipPerson}}

+

状态:未上传

+
+
- + 状态:未上传 + + + 新增 @@ -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 @@