123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868 |
- <template>
- <div class="my-container">
- <div class="bill-main" v-show="isShow==='home'" key="index">
- <module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
- @resert="onRefresh" @onRefresh="onRefresh" @detail="openEdit">
- </module-view>
- </div>
- <!-- 新增/编辑弹窗 -->
- <div class="detail" v-show="isShow==='detail'" key="index2">
- <by-tool :propConfig="toolConfig" @clickHandle="insideTools" />
- <div class="box-shadow">
- <by-form :propConfig="detailConfig" ref="addFormId"></by-form>
- <by-table :propConfig="tableConfig" ref="table"></by-table>
- </div>
- </div>
- </div>
- </template>
- <script lang="ts">
- import { Component, Prop, Vue, Watch } from "vue-property-decorator";
- import { getShortBargePageData, getShortBargeSingleData } from '@/api/delivery';
- import Logistics from "@/components/Assembly/logistics.vue";
- import Logistics2 from "@/components/Assembly/logistics2.vue";
- import storeHouse from "@/components/Assembly/storeHouse.vue";
-
- @Component
- export default class myShortBarge extends Vue {
- timeNum = 0;
- calculateCount = 0;
- isShow : any = 'home'
- timer : any = null
- toolConfig = {
- tools: {
- return: true,
- },
- }
- config : any = {
- attr: {
- calculateH: true
- },
- search: {
- attr: {
- size: 'mini',
- },
- columns: [
- [{
- span: 6,
- label: '短驳单单号',
- prop: 'shortBargeCode',
- component: 'by-input',
- compConfig: {
- attr: {
- placeholder: '请输入短驳单单号',
- clearable: true
- },
- },
- }]
- ]
- },
- tool: {
- tools: {
- search: true,
- refresh: true
- }
- },
- table: {
- attr: {
- size: 'mini',
- align: 'left',
- },
- columns: [{
- title: '短驳单单号',
- field: 'shortBargeCode',
- width: 200,
- isDetail: true,
- fixed: 'left'
- },
- // {
- // width: 200,
- // title: 'WMS仓库编号',
- // field: 'wmsWarehouseCode',
- // },
- {
- width: 200,
- title: 'ERP单据类型',
- field: 'wmsSendType',
- component: Logistics,
- },
- {
- width: 200,
- title: 'TMS平台业务单号',
- field: 'tmsClientOrderNo',
- },
- {
- width: 200,
- title: '发货单状态',
- field: 'tmsOrderStatus',
- component: Logistics,
- },
- {
- width: 200,
- title: '开单时间',
- field: 'tmsBillingDate',
- },
- {
- width: 200,
- title: '业务员',
- field: 'tmsBusinessMan',
- },
- {
- width: 200,
- title: '业务员手机号',
- field: 'tmsBusinessPhone',
- },
- {
- width: 200,
- title: '运输方式',
- field: 'tmsTransportMethod',
- },
- {
- width: 200,
- title: '发货单位',
- field: 'tmsShipmentCompanyName',
- },
- {
- width: 200,
- title: '发货省',
- field: 'tmsShipmentProvince',
- },
- // {
- // width: 200,
- // title: '发货省编码',
- // field: 'tmsShipmentProvinceNo',
- // },
- {
- width: 200,
- title: '发货市',
- field: 'tmsShipmentCity',
- },
- // {
- // width: 200,
- // title: '发货市编码',
- // field: 'tmsShipmentCityNo',
- // },
- {
- width: 200,
- title: '发货区(县)',
- field: 'tmsShipmentRegion',
- },
- // {
- // width: 200,
- // title: '发货区(县)编码',
- // field: 'tmsShipmentRegionNo',
- // },
- {
- width: 200,
- title: '发货街道',
- field: 'tmsShipmentStreet',
- },
- // {
- // width: 200,
- // title: '发货街道编码',
- // field: 'tmsShipmentStreetNo',
- // },
- {
- width: 200,
- title: '发货地址',
- field: 'tmsShipmentAddress',
- },
- {
- width: 200,
- title: '发货人',
- field: 'tmsShipmentConsignor',
- },
- {
- width: 200,
- title: '发货人联系方式',
- field: 'tmsShipmentContacts',
- },
- {
- width: 200,
- title: '发货点经度',
- field: 'tmsShipmentLng',
- },
- {
- width: 200,
- title: '发货点纬度',
- field: 'tmsShipmentLat',
- },
- {
- width: 200,
- title: '收货单位',
- field: 'tmsUnloadingCompanyName',
- },
- {
- width: 200,
- title: '收货省',
- field: 'tmsUnloadingProvince',
- },
- // {
- // width: 200,
- // title: '收货省编码',
- // field: 'tmsUnloadingProvinceNo',
- // },
- {
- width: 200,
- title: '收货市',
- field: 'tmsUnloadingCity',
- },
- // {
- // width: 200,
- // title: '收货市编码',
- // field: 'tmsUnloadingCityNo',
- // },
- {
- width: 200,
- title: '收货区(县)',
- field: 'tmsUnloadingRegion',
- },
- // {
- // width: 200,
- // title: '收货区(县)编码',
- // field: 'tmsUnloadingRegionNo',
- // },
- {
- width: 200,
- title: '收货街道',
- field: 'tmsUnloadingStreet',
- },
- // {
- // width: 200,
- // title: '收货街道编码',
- // field: 'tmsUnloadingStreetNo',
- // },
- {
- width: 200,
- title: '收货地址',
- field: 'tmsUnloadingAddress',
- },
- {
- width: 200,
- title: '收货人',
- field: 'tmsUnloadingConsignor',
- },
- {
- width: 200,
- title: '收货人联系方式',
- field: 'tmsUnloadingContacts',
- },
- {
- width: 200,
- title: '收货点经度',
- field: 'tmsUnloadingLng',
- },
- {
- width: 200,
- title: '收货点纬度',
- field: 'tmsUnloadingLat',
- },
- {
- width: 200,
- title: '要求提货时间',
- field: 'tmsDeliveryDate',
- },
- {
- width: 200,
- title: '要求送达时间',
- field: 'tmsArrivalDate',
- },
- {
- width: 200,
- title: '货物总数量',
- field: 'tmsTotalQuantity',
- },
- {
- width: 200,
- title: '货物总重量(kg)',
- field: 'tmsTotalWeight',
- },
- {
- width: 200,
- title: '货物总体积(cm³)',
- field: 'tmsTotalVolume',
- },
- {
- width: 200,
- title: '承运商名称',
- field: 'tmsCarrierName',
- },
- {
- width: 200,
- title: '车型要求',
- field: 'tmsNeedCarType',
- },
- {
- width: 200,
- title: '货物信息',
- field: 'tmsGoodsInfos',
- },
- {
- width: 200,
- title: '备注',
- field: 'tmsRemark',
- },
- {
- width: 200,
- title: '司机姓名',
- field: 'tmsDriverName',
- },
- {
- width: 200,
- title: '司机号码',
- field: 'tmsDriverPhone',
- },
- {
- width: 200,
- title: '派车时间',
- field: 'tmsDispatchTime',
- },
- ]
- },
- }
- detailConfig = {
- attr: {
- size: 'medium',
- readonly: true
- },
- columns: [
- [
- {
- span: 6,
- label: '短驳单单号',
- prop: 'shortBargeCode',
- component: 'by-input',
- },
- // {
- // span: 6,
- // labelWidth: '110px',
- // label: 'WMS仓库编号',
- // prop: 'wmsWarehouseCode',
- // component: 'by-input',
- // },
- {
- span: 6,
- label: 'ERP单据类型',
- prop: 'wmsSendType',
- component: Logistics2,
- },
- {
- span: 6,
- labelWidth: '128px',
- label: 'TMS平台业务单号',
- prop: 'tmsClientOrderNo',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '发货单状态',
- prop: 'tmsOrderStatus',
- component: Logistics2,
- },
- {
- span: 6,
- label: '开单时间',
- prop: 'tmsBillingDate',
- component: 'by-input',
- },
- {
- span: 6,
- label: '业务员',
- prop: 'tmsBusinessMan',
- component: 'by-input',
- },
- {
- span: 6,
- label: '业务员手机号',
- prop: 'tmsBusinessPhone',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '运输方式',
- prop: 'tmsTransportMethod',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货单位',
- prop: 'tmsShipmentCompanyName',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货省',
- prop: 'tmsShipmentProvince',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货省编码',
- prop: 'tmsShipmentProvinceNo',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '发货市',
- prop: 'tmsShipmentCity',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货区(县)',
- prop: 'tmsShipmentRegion',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货街道',
- prop: 'tmsShipmentStreet',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货人',
- prop: 'tmsShipmentConsignor',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '发货市编码',
- prop: 'tmsShipmentCityNo',
- component: 'by-input',
- },
- {
- span: 6,
- labelWidth: '128px',
- label: '发货区(县)编码',
- prop: 'tmsShipmentRegionNo',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货街道编码',
- prop: 'tmsShipmentStreetNo',
- component: 'by-input',
- },
- {
- span: 6,
- labelWidth: '110px',
- label: '发货人联系方式',
- prop: 'tmsShipmentContacts',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '发货地址',
- prop: 'tmsShipmentAddress',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货点经度',
- prop: 'tmsShipmentLng',
- component: 'by-input',
- },
- {
- span: 6,
- label: '发货点纬度',
- prop: 'tmsShipmentLat',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货单位',
- prop: 'tmsUnloadingCompanyName',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '收货省',
- prop: 'tmsUnloadingProvince',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货市',
- prop: 'tmsUnloadingCity',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货区(县)',
- prop: 'tmsUnloadingRegion',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货街道',
- prop: 'tmsUnloadingStreet',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '收货省编码',
- prop: 'tmsUnloadingProvinceNo',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货市编码',
- prop: 'tmsUnloadingCityNo',
- component: 'by-input',
- },
- {
- span: 6,
- labelWidth: '128px',
- label: '收货区(县)编码',
- prop: 'tmsUnloadingRegionNo',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货街道编码',
- prop: 'tmsUnloadingStreetNo',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '收货人',
- prop: 'tmsUnloadingConsignor',
- component: 'by-input',
- },
- {
- span: 6,
- labelWidth: '110px',
- label: '收货人联系方式',
- prop: 'tmsUnloadingContacts',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货地址',
- prop: 'tmsUnloadingAddress',
- component: 'by-input',
- },
- {
- span: 6,
- label: '收货点经度',
- prop: 'tmsUnloadingLng',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '收货点纬度',
- prop: 'tmsUnloadingLat',
- component: 'by-input',
- },
- {
- span: 6,
- label: '要求提货时间',
- prop: 'tmsDeliveryDate',
- component: 'by-input',
- },
- {
- span: 6,
- label: '要求送达时间',
- prop: 'tmsArrivalDate',
- component: 'by-input',
- },
- {
- span: 6,
- label: '货物总数量',
- prop: 'tmsTotalQuantity',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '货物总重量(kg)',
- prop: 'tmsTotalWeight',
- component: 'by-input',
- labelWidth: '110px',
- },
- {
- span: 6,
- label: '货物总体积(cm³)',
- prop: 'tmsTotalVolume',
- component: 'by-input',
- labelWidth: '116px',
- },
- {
- span: 6,
- label: '承运商名称',
- prop: 'tmsCarrierName',
- component: 'by-input',
- },
- {
- span: 6,
- label: '车型要求',
- prop: 'tmsNeedCarType',
- component: 'by-input',
- },
- ],
- [
- {
- span: 6,
- label: '货物信息',
- prop: 'tmsGoodsInfos',
- component: 'by-input',
- },
- {
- span: 6,
- label: '司机姓名',
- prop: 'tmsDriverName',
- component: 'by-input',
- },
- {
- span: 6,
- label: '司机号码',
- prop: 'tmsDriverPhone',
- component: 'by-input',
- },
- {
- span: 6,
- label: '派车时间',
- prop: 'tmsDispatchTime',
- component: 'by-input',
- },
- ],
- [
- {
- span: 30,
- label: '备注',
- prop: 'tmsRemark',
- component: 'by-input',
- compConfig: {
- attr: {
- type: 'textarea'
- },
- }
- }
- ]
- ]
- }
- tableConfig = {
- attr: {
- size: 'mini',
- align: 'left',
- readonly: true
- },
- columns:
- [{
- width: 250,
- title: '商品SKUID',
- field: 'skuId',
- },
- {
- width: 250,
- title: '商品名称',
- field: 'skuName',
- },
- {
- width: 250,
- title: '短驳出库仓库',
- field: 'wareHouseCode',
- component: storeHouse,
- },
- {
- width: 250,
- title: '短驳入库仓库',
- field: 'entryStoreHouseId',
- component: storeHouse,
- },
- {
- width: 180,
- title: '库存类型',
- field: 'stortType',
- component: Logistics,
- },
- {
- width: 180,
- title: '单价',
- field: 'tmsGoodsPrice',
- },
- {
- width: 180,
- title: '数量',
- field: 'tmsQuantity',
- },
- {
- width: 180,
- title: '数量单位',
- field: 'tmsQuantityUnit',
- },
- {
- width: 180,
- title: '商品过期日期',
- field: 'expireDate',
- },
- {
- width: 180,
- title: '货物型号',
- field: 'tmsGoodsModel',
- },
- {
- width: 180,
- title: '小计',
- field: 'tmsGoodsTotalPrice',
- },
- {
- width: 180,
- title: '重量(kg)',
- field: 'tmsWeight',
- },
- {
- width: 180,
- title: '体积(cm³)',
- field: 'tmsVolume',
- },
- ]
- }
- mounted() {
- this.timer = setInterval(() => {
- this.getDataList();
- this.initTable();
- }, 300)
- }
- // 计算高度
- initTable() {
- if (!this.$refs.moduleView) {
- this.calculateCount++;
- if (this.calculateCount > 5) return;
- setTimeout(() => {
- this.initTable()
- }, 500)
- return
- }
- let tableId : any = (this as any).$refs.moduleView.tableID;
- this.config.table.attr.height = window.innerHeight - 320;
- (this as any).$refs.moduleView.$refs[tableId].recalculate();
- }
- // 打开编辑
- openEdit(e : any) {
- let loading = this.$loading({ target: '.main-container' });
- getShortBargeSingleData({ id: e.id }).then((res : any) => {
- if (res.code === 200) {
- this.isShow = 'detail';
- loading.close();
- this.$nextTick(() => {
- (this as any).$refs.addFormId.setValue(res.data);
- (this as any).$refs.table.setValue(res.data.items);
- });
- } else loading.close();
- }).catch(() => loading.close());
- }
- // 获取列表数据
- getDataList() {
- if (!this.$refs.moduleView) {
- if (this.timeNum > 5) {
- clearInterval(this.timer)
- }
- this.timeNum++;
- return
- }
- clearInterval(this.timer)
- let query = (this.$refs.moduleView as any).getQuery();
- // console.log(query);
- this.getPageList(query);
- }
- getPageList(query : any) {
- let loading = this.$loading({ target: '.main-container' });
- getShortBargePageData(query).then((res : any) => {
- loading.close();
- if (res.code === 200) {
- (this.$refs.moduleView as any).setTableValue(res.data.records);
- let page = {
- pageNo: res.data.current, //当前页
- pageSize: res.data.size, //每页条数
- total: res.data.total //总条数
- };
- (this.$refs.moduleView as any).setPage(page);
- } else this.$message.error(res.msg);
- }).catch(() => loading.close());
- }
- // 内页工具栏方法
- insideTools(e : any) {
- if (e === 'onReturn') this.isShow = 'home';
- }
- // 刷新/重置
- onRefresh() {
- (this as any).$refs.moduleView.clearSearch();
- this.getDataList();
- }
- }
- </script>
- <style lang="scss" scoped>
- .my-container {
- width: 100%;
- box-sizing: border-box;
- display: flex;
- padding: 16px;
- height: 100%;
- .bill-left {
- position: relative;
- border-right: solid #EEE 1px;
- flex-shrink: 0;
- .bill-tab {
- width: 150px;
- height: 100%;
- transition: all .5s;
- overflow: hidden;
- }
- .tab-title {
- font-size: 16px;
- padding-bottom: 16px;
- width: 200px;
- }
- }
- .bill-main {
- width: 100%;
- box-sizing: border-box;
- position: relative;
- height: 100%;
- overflow-y: hidden;
- }
- .detail {
- width: 100%;
- padding: 16px;
- .box-shadow {
- box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
- padding: 20px;
- border-radius: 4px;
- border: 1px solid #e6ebf5;
- background-color: #fff;
- overflow: hidden;
- color: #303133;
- -webkit-transition: .3s;
- transition: .3s;
- margin-top: 20px;
- }
- }
- }
- </style>
|