From 8a2335ce2d6122fd63df87e381af6215915b785f Mon Sep 17 00:00:00 2001 From: sunzehua Date: Thu, 18 May 2023 16:37:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modular/main/BookingLedger.js | 10 +- src/components/Table/index.js | 35 +- src/store/modules/booking.js | 12 +- .../detail/modules/mailingInfo.vue | 58 ++- .../detail/style/mailingInfo.less | 17 + src/views/main/BookingLedger/list/index.vue | 359 ++++++++++++++---- src/views/system/user/index.vue | 31 +- 7 files changed, 395 insertions(+), 127 deletions(-) diff --git a/src/api/modular/main/BookingLedger.js b/src/api/modular/main/BookingLedger.js index 63919f8..0625b4b 100644 --- a/src/api/modular/main/BookingLedger.js +++ b/src/api/modular/main/BookingLedger.js @@ -773,7 +773,7 @@ export function DeleteBookingOrder(parameter) { }) } -//恢复删除 +// 恢复删除 export function RecoverDeleteOrder(parameter) { return axios({ url: '/BookingOrder/RecoverDelete?Ids=' + parameter, @@ -864,3 +864,11 @@ export function seaeEdiCustEDI(parameter) { data: parameter }) } + +export function downloadBookingConfirm(parameter) { + return axios({ + url: '/BookingValueAdded/DownloadBookingConfirm', + method: 'post', + data: parameter + }) +} diff --git a/src/components/Table/index.js b/src/components/Table/index.js index 33f75c5..e42b8a4 100644 --- a/src/components/Table/index.js +++ b/src/components/Table/index.js @@ -46,6 +46,10 @@ export default { type: Boolean, default: true }, + pageSizeOptions: { + type: Array, + default: ['10', '20', '30', '40', '50'] + }, size: { type: String, default: 'middle' @@ -125,7 +129,7 @@ export default { current: localPageNum, pageSize: this.pageSize, showSizeChanger: this.showSizeChanger, - //pageSizeOptions: ['10', '20', '30', '40', '50'], //分页选项 + pageSizeOptions: this.pageSizeOptions, showTotal: (total, range) => { return range[0] + '-' + range[1] + '共' + total + '条' } @@ -134,16 +138,16 @@ export default { this.needTotalList = this.initTotalList(this.columns) this.loadData() // this.columnsSetting = this.columns - //记录选择显示的列,以当前路由为key + // 记录选择显示的列,以当前路由为key this.columnsSetting = [] - let cacheColumns = this.$ls.get(this.$route.path) + const cacheColumns = this.$ls.get(this.$route.path) if (cacheColumns && cacheColumns.length > 0) { this.columnsSetting = cacheColumns this.columns.forEach((item, index, arr) => { - let temp = this.columnsSetting.find(m => m.dataIndex == item.dataIndex) - //如果存在 + const temp = this.columnsSetting.find(m => m.dataIndex == item.dataIndex) + // 如果存在 if (temp) { arr[index].checked = temp.checked } @@ -178,7 +182,9 @@ export default { * @param {Object} sorter 排序条件 */ loadData(pagination, filters, sorter) { + console.log(pagination) this.localLoading = true + const parameter = Object.assign( { pageNo: @@ -188,20 +194,17 @@ export default { (this.showPagination && this.localPagination.pageSize) || this.pageSize }, - (sorter && - sorter.field && { - sortField: sorter.field - }) || - {}, - (sorter && - sorter.order && { - sortOrder: sorter.order - }) || - {}, + (sorter && sorter.field && { SortField: sorter.field }) || {}, + (sorter && sorter.order && { sortOrder: sorter.order }) || {}, { ...filters } ) + if (sorter && sorter.order === 'descend') { + parameter.DescSort = true + } else { + parameter.DescSort = false + } const result = this.data(parameter) // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.totalCount, r.data // eslint-disable-next-line @@ -379,7 +382,7 @@ export default { title: '列设置', isDropdown: true, menu: () => { - //return + // return return }, onClick: () => {} diff --git a/src/store/modules/booking.js b/src/store/modules/booking.js index bcffd67..c06fabb 100644 --- a/src/store/modules/booking.js +++ b/src/store/modules/booking.js @@ -330,12 +330,12 @@ const booking = { allData['payableatInitList'] = $data break case 'user': - allData['saleInitList'] = $data.result - allData['opInitList'] = $data.result - allData['docInitList'] = $data.result - allData['custserviceInitList'] = $data.result - allData['routeInitList'] = $data.result - allData['lineManageInitList'] = $data.result + allData['saleInitList'] = $data + allData['opInitList'] = $data + allData['docInitList'] = $data + allData['custserviceInitList'] = $data + allData['routeInitList'] = $data + allData['lineManageInitList'] = $data break case 'contractno': allData['contractnoInitList'] = $data diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index b83688a..7155ffa 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -13,9 +13,26 @@
- +
+ + +
+
发货人
- 保存保存
* @@ -119,8 +141,13 @@ @change="getSelectViewRes" style="flex: 1" > - 保存保存
* @@ -148,7 +175,13 @@
- +
@@ -1144,15 +1177,15 @@ export default { }, SetTOTALNO(SS) { SS = SS.toString() - let i = SS.indexOf('\n') + const i = SS.indexOf('\n') let num = 0 let strKind = '' let enCapital = '' if (i > 0) { - let slist = SS.split('\n') + const slist = SS.split('\n') for (let i = 0; i < slist.length; i += 1) { - let member = slist[i] - let strNum = this.GetStringNum(member) + const member = slist[i] + const strNum = this.GetStringNum(member) if (i == 0) { strKind = member.substring(strNum.length) } @@ -1266,14 +1299,15 @@ export default { } a = a.substring(1) } - if (a.length == 2) - if (a.substr(0, 1) == '0') a = a.substring(1) + if (a.length == 2) { + if (a.substr(0, 1) == '0') a = a.substring(1) else if (a.substr(0, 1) == '1') strRet += arr4[a.substr(1, 2)] else { strRet += arr2[a.substr(0, 1)] if (a.substr(1, 1) != '0') strRet += '-' a = a.substring(1) } +} if (a.length == 1 && a.substr(0, 1) != '0') strRet += arr3[a.substr(0, 1)] return strRet }, diff --git a/src/views/main/BookingLedger/detail/style/mailingInfo.less b/src/views/main/BookingLedger/detail/style/mailingInfo.less index 9f917ce..450428b 100644 --- a/src/views/main/BookingLedger/detail/style/mailingInfo.less +++ b/src/views/main/BookingLedger/detail/style/mailingInfo.less @@ -237,6 +237,23 @@ } } } + .sender{ + position: relative; + .move-btn{ + position: absolute; + height: 20px; + // transform: rotateY(180deg); + top: 5px; + right: 0; + // background: #f99; + z-index: 99; + i{ + display: block; + font-size: 14px; + color: #ff9702; + } + } + } /deep/ .ant-form-item-children-icon .anticon-check-circle { display: none; } diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 173e57c..30cb138 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -8,17 +8,30 @@ - 查询 重置 @@ -72,7 +85,11 @@ > --> - @@ -111,11 +128,20 @@
- @@ -267,8 +299,11 @@
- + @@ -295,8 +330,10 @@

{{ TaskShippingOrderCompareData.mBlNo }}

-

{{ item.fieldName }}:

{{ item.reqVal }}

@@ -319,9 +356,12 @@

箱信息:(场站数据)

-
+

{{ item.fieldName }}:

{{ item.reqVal }}

@@ -358,18 +398,34 @@ -

- - +
备注内容:
@@ -379,11 +435,14 @@
-
+
货运动态
@@ -543,7 +697,8 @@ import { DjyUserConfigMulti, DeleteBookingOrder, ExcuteShippingOrderCompareBatch, - GetTenantLineList + GetTenantLineList, + downloadBookingConfirm } from '@/api/modular/main/BookingLedger' import initData from './modules/initData' @@ -651,7 +806,9 @@ export default { portDischargeData: [], destinationData: [], RcarrierData: [], - RecentlyCarrierData: [] + RecentlyCarrierData: [], + bcFile: {}, + bcFileFlag: false } }, computed: { @@ -753,7 +910,29 @@ export default { // } } }, - handleDownByBc() { }, + handleDownByBc() { + const select = this.$refs.xGrid.getCheckboxRecords() + const pkIdArr = select.map((item, index) => { + return item.id + }) + if (pkIdArr.length === 0) { + this.$message.error('请至少选择一条数据') + return false + } else { + downloadBookingConfirm(pkIdArr) + .then((res) => { + if (res.success) { + this.bcFileFlag = true + this.bcFile = res.data + } else { + this.$message.error(res.message) + } + }) + .catch((err) => { + console.log(err) + }) + } + }, // 批量编辑 editingHandleOk() { const { @@ -898,7 +1077,6 @@ export default { }) }, setSort(item) { - const key = JSON.parse(item.configJson).key const sort = JSON.parse(item.configJson).sort this.tableOrderLabel = key || '' @@ -909,7 +1087,7 @@ export default { // 船公司 - start getCarrier() { const Rdata = (data) => { - let RData = {} + const RData = {} for (var i = 0; i < 26; i++) { RData[String.fromCharCode(65 + i)] = [] data.forEach((item) => { @@ -918,14 +1096,14 @@ export default { } }) } - let Obj = { + const Obj = { 'A-D': ['A', 'B', 'C', 'D'], 'E-L': ['E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'], 'M-R': ['M', 'N', 'O', 'P', 'Q', 'R'], 'S-U': ['S', 'T', 'U'], 'V-Z': ['V', 'W', 'X', 'Y', 'Z'] } - let Data = { + const Data = { 'A-D': [], 'E-L': [], 'M-R': [], @@ -955,7 +1133,7 @@ export default { DjyUserConfigGet({ type: 'booking_memory' }) .then((e) => { if (e.data) { - let data = [] + const data = [] JSON.parse(e.data.configJson).forEach((item) => { res.data.forEach((item2) => { if (item == item2.code) { @@ -1131,7 +1309,7 @@ export default { toggleAdvanced() { this.advanced = !this.advanced this.$forceUpdate() - let start = new Date().getTime() + const start = new Date().getTime() console.log('== 点击展开 ==', start) if (!this.advanced) { const len = this.formData.length % 4 @@ -1409,7 +1587,7 @@ export default { } }, addSubmit() { - let data = [] + const data = [] data.push(this.carrierRadio) if (this.RecentlyCarrierData.length) { this.RecentlyCarrierData.forEach((item) => { @@ -2832,4 +3010,19 @@ export default { // .more-btn{ // } // } +.bcfile-title{ + border-bottom:1px dashed black; + padding-bottom: 5px; + margin-bottom: 10px; +} +.bc-box{ + max-height: 200px; + overflow-y: auto; + padding-right: 14px; + .bc-item{ + margin: 7px 0px; + display: flex; + justify-content: space-between; + } +} diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 0c5a7f9..d81abd9 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -50,12 +50,17 @@ :columns="columns" :data="loadData" :alert="true" + :pageSizeOptions="['10', '20', '50', '100']" :rowKey="record => record.id" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" >