From 50c0452f4347d50f3796a01f0a17ef0158ebf7a0 Mon Sep 17 00:00:00 2001 From: Panzihang <819652404@qq.com> Date: Tue, 7 Nov 2023 18:02:20 +0800 Subject: [PATCH] 11.7 --- components/head-info/head-info.vue | 15 +- pages.json | 12 + pages/discharge/index.vue | 15 +- pages/discharge/instruct.vue | 2 - pages/index/index.vue | 14 +- pages/quality/test.html | 54 --- pages/receipt/details.vue | 532 +++++++++++++++++++++++++++++ pages/receipt/index.vue | 338 +++++++++++++++++- pages/receipt/sign.vue | 284 +++++++++++++++ 9 files changed, 1173 insertions(+), 93 deletions(-) delete mode 100644 pages/quality/test.html create mode 100644 pages/receipt/details.vue create mode 100644 pages/receipt/sign.vue diff --git a/components/head-info/head-info.vue b/components/head-info/head-info.vue index 6826f63..bf91c36 100644 --- a/components/head-info/head-info.vue +++ b/components/head-info/head-info.vue @@ -97,6 +97,7 @@ portId: "", portName: "", activeIndex: 0, + mediaType: "pad", navList: [{ url: "/pages/index/index", name: "装船指令", @@ -129,13 +130,13 @@ imageUrl: "../../static/images/theme/jcIcon1-1.png", imageUrl2: "../../static/images/theme/jcIcon1-2.png" }, - // { - // url: "/pages/receipt/index", - // name: "进出口货物交接单", - // type: false, - // imageUrl: "../../static/images/theme/jckIcon1-1.png", - // imageUrl2: "../../static/images/theme/jckIcon1-2.png" - // } + { + url: "/pages/receipt/index", + name: "进出口货物交接单", + type: false, + imageUrl: "../../static/images/theme/jckIcon1-1.png", + imageUrl2: "../../static/images/theme/jckIcon1-2.png" + } ], lotusLoadingData: { isShow: false //设置显示加载中组件true显示false隐藏 diff --git a/pages.json b/pages.json index f936e22..38e8f8d 100644 --- a/pages.json +++ b/pages.json @@ -279,6 +279,18 @@ "navigationBarTitleText": "进出口货物交接单" } }, + { + "path": "pages/receipt/details", + "style": { + "navigationBarTitleText": "装卸货物交接计数单" + } + }, + { + "path": "pages/receipt/sign", + "style": { + "navigationBarTitleText": "进出口货物交接单签字" + } + }, { "path": "pages/test/ceshi", "style": { diff --git a/pages/discharge/index.vue b/pages/discharge/index.vue index 21f6de4..87e5cce 100644 --- a/pages/discharge/index.vue +++ b/pages/discharge/index.vue @@ -75,11 +75,11 @@ tradeItem: {}, tradeList: [{ value: "1", - name: "内贸" + name: "外贸" }, { value: "2", - name: "外贸" + name: "内贸" } ], vvyShip: "", @@ -90,7 +90,7 @@ // 分页 total: 0, - pageSize: 6, + pageSize: 9, current: 1, // 港区信息 @@ -200,7 +200,6 @@ uni.navigateTo({ url: '/pages/discharge/instruct?params=' + params }) - }, } }; @@ -251,6 +250,8 @@ justify-content: flex-start; flex-wrap: wrap; position: relative; + margin-top: 15px; + gap: 16px; /deep/.o-empty { width: 100%; @@ -258,12 +259,10 @@ } .item { - width: 32%; - margin-top: 15px; - margin-right: 2%; + width: 32.2%; background-color: #fff; border-radius: 8px; - padding: 20px; + padding: 10px 20px; position: relative; .title { diff --git a/pages/discharge/instruct.vue b/pages/discharge/instruct.vue index fc9517e..0960159 100644 --- a/pages/discharge/instruct.vue +++ b/pages/discharge/instruct.vue @@ -788,7 +788,6 @@ - - \ No newline at end of file diff --git a/pages/receipt/details.vue b/pages/receipt/details.vue new file mode 100644 index 0000000..cb3b7af --- /dev/null +++ b/pages/receipt/details.vue @@ -0,0 +1,532 @@ + + + + + \ No newline at end of file diff --git a/pages/receipt/index.vue b/pages/receipt/index.vue index 8dacf93..44286e8 100644 --- a/pages/receipt/index.vue +++ b/pages/receipt/index.vue @@ -1,6 +1,66 @@ @@ -8,39 +68,287 @@ export default { data() { return { + // 登录信息 loginObj: {}, + // 港区信息 + portObj: {}, + // 进出口 + importExport: "出口", + importExportList: [{ + value: "E", + name: "出口" + }, + { + value: "I", + name: "进口" + } + ], + // 内外贸 + tradeName: "外贸", + tradeList: [{ + value: "1", + name: "外贸" + }, + { + value: "2", + name: "内贸" + } + ], + // 船名航次 + vvyShip: "", + vvyId: "", + shipId: "", + shipName: '', + shipList: [], + + itemList: [], + + // 分页 + total: 0, + pageSize: 9, + current: 1, } }, mounted() { this.loginObj = uni.getStorageSync('loginObj') - this.getInfo() + this.portObj = uni.getStorageSync('portObj') + this.getShip() + this.initData() }, methods: { - getInfo() { - // 一级页面 /shp/iEDeliverySlipController/page GET - // 二级页面 /shp/iEDeliverySlipController/planPage?vvyId=2455a195e549db737fa4431f91995e46&importExportFlag=E 航次 进出口标识 GET - // 二级页面质损 /shp/iEDeliverySlipController/iEDeliverySlipPlanDamage splId 进出口标识 POST - // 提交签名 /vesselVoyages/vvyId 根据ID更新 可修改总指令装船要求 PUT - let obj = { - splId: "b3a2141b0ec99635f7bd69d1bd3b4a8a", - importExportFlag: "E" + // 切换贸易类型 + tradeSelect(e) { + this.tradeName = e.name + this.shipId = "" + this.shipName = "" + this.vvyId = "" + this.vvyShip = "" + this.getShip() + }, + // 切换进出口 + importExportSelect(e) { + this.importExport = e.name + this.shipId = "" + this.shipName = "" + this.vvyId = "" + this.vvyShip = "" + this.getShip() + }, + // 选择船 + shipSelect(e) { + this.shipId = e.spmId + this.shipName = e.vslCnname + this.vvyId = e.vvyId + this.vvyShip = e.vvyShip + }, + // 获取船舶 + getShip() { + if (this.tradeName == '外贸') { + this.tradeType = "W" + } else { + this.tradeType = "N" } + let ieType = "" + if (this.importExport == '出口') { + ieType = "E" + } else { + ieType = "I" + } + let key = "" + let spmId = "" uni.request({ - url: `${this.$local}/shp/iEDeliverySlipController/iEDeliverySlipPlanDamage`, - data: obj, + url: `${this.$local}/api/shipInstructions/queryByKey?ieType=${ieType}&key=${ieType}&pamId=${this.portObj.portId}&spmId=${spmId}&tradeType=${this.tradeType}`, header: { 'Content-Type': 'application/json', //自定义请求头信息 'Authorization': `Bearer ${this.loginObj.access_token}` }, - method: 'POST', //请求方式,必须为大写 + method: 'GET', //请求方式,必须为大写 success: (res) => { - console.log(res) + if (res.data.status == "200") { + this.shipList = res.data.data + this.shipList.forEach(v => { + let vvyShip = `${v.vslCnname}/${v.vvyName}` + this.$set(v, "vvyShip", vvyShip) + }) + } } }) - } + }, + // 点击搜索 + onSearch() { + this.initData() + }, + // 获取船只 + initData() { + // 一级页面 /shp/iEDeliverySlipController/page GET + // 二级页面 /shp/iEDeliverySlipController/planPage?vvyId=2455a195e549db737fa4431f91995e46&importExportFlag=E 航次 进出口标识 GET + // 二级页面质损 /shp/iEDeliverySlipController/iEDeliverySlipPlanDamage splId 进出口标识 POST + // 提交签名 /vesselVoyages/vvyId 根据ID更新 可修改总指令装船要求 PUT + let importExportFlag = "" + if (this.importExport == '出口') { + importExportFlag = "E" + } else { + importExportFlag = "I" + } + let tradType = "" + if (this.tradeName == '外贸') { + tradType = "W" + } else { + tradType = "N" + } + uni.request({ + url: `${this.$local}/shp/iEDeliverySlipController/page?pamId=${this.portObj.portId}&vvyId=${this.vvyId}&size=${this.pageSize}¤t=${this.current}&importExportFlag=${importExportFlag}&tradType=${tradType}`, + header: { + 'Content-Type': 'application/json', //自定义请求头信息 + 'Authorization': `Bearer ${this.loginObj.access_token}` + }, + method: 'GET', //请求方式,必须为大写 + success: (res) => { + console.log(res) + this.total = res.data.data.total + this.itemList = res.data.data.records + } + }) + }, + // 点击分页 + changePage(e) { + this.current = e.current; + this.initData() + }, + // 点击进入详情 + toDetails(item) { + let obj = { + vvyId: item.vvyId, + } + const params = encodeURIComponent(JSON.stringify(obj)); + uni.navigateTo({ + url: '/pages/receipt/details?params=' + params + }) + }, } } - \ No newline at end of file diff --git a/pages/receipt/sign.vue b/pages/receipt/sign.vue new file mode 100644 index 0000000..d76ce8d --- /dev/null +++ b/pages/receipt/sign.vue @@ -0,0 +1,284 @@ + + + + \ No newline at end of file