123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458 |
- <template>
- <!-- 新增 预装箱单-成衣-->
- <div id="addAdvancePacking">
- <a-drawer
- title="新增预装箱单-成衣"
- width="89%"
- placement="right"
- :closable="true"
- :visible="visible"
- @close="handleCancel"
- >
- <!-- 主表信息 填写 -->
- <a-card :bordered="false">
- <div class="table-page-search-wrapper">
- <!-- :rules="validatorRules" -->
- <a-form-model layout="inline" ref="form" :model="addAdpacking">
- <a-row :gutter="24">
- <a-col :md="6" :sm="8">
- <a-form-model-item label="单据号" prop="orderNumber">
- {{addAdpacking.orderNumber}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="集装箱代号" prop="containerCode">
- {{addAdpacking.containerCode}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="集装箱号" prop="containerNumber">
- {{addAdpacking.containerNumber}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="预发货日期" prop="u8Remarks">
- {{addAdpacking.preDeliveryDate}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="u8备注" prop="u8Remarks">
- {{addAdpacking.u8Remarks}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="款号" prop="itemNumber">
- {{addAdpacking.itemNumber}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="品名" prop="productName">
- {{addAdpacking.productName}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="尺码范围" prop="sizeRange">
- {{addAdpacking.sizeRange}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="客户" prop="customer">
- {{addAdpacking.customer}}
- </a-form-model-item>
- </a-col>
-
- <a-col :md="6" :sm="8">
- <a-form-model-item label="成衣工厂" prop="garmentFactory">
-
- {{addAdpacking.garmentFactory}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="总箱数" prop="totalBoxes">
- {{addAdpacking.totalBoxes}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="总净重" prop="totalNetWeight">
- {{addAdpacking.totalNetWeight}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="总毛重" prop="totalGrossWeight">
- {{addAdpacking.totalGrossWeight}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="总体积" prop="totalVolume">
- {{addAdpacking.totalVolume}}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="总价" prop="totalPrice">
- {{addAdpacking.totalPrice}}
- </a-form-model-item>
- </a-col>
- </a-row>
- </a-form-model>
- </div>
- </a-card>
- <!-- 参照发运明细 増行-->
- <a-card :bordered="false" style="margin:10px 0 60px 0;">
- <!-- 子表 ipagination :rules="validatorRules"-->
- <a-spin :spinning="confirmLoading">
- <a-form-model ref="formRef">
- <j-vxe-table
- ref="vTable"
- toolbar
- row-number
- row-selection
- drag-sort
- keep-source
- :height="300"
- :loading="loading"
- :dataSource="addAdpacking.syPreAssembledPackingListItemList"
- :columns="columns"
- :alwaysEdit=true
- :bordered=true
- :scroll="{ x: 1500 }"
- style="margin-top: 5px;"
- :toolbarConfig="toolbarConfig"
- @valueChange="handleValueChange"
- >
- </j-vxe-table>
- </a-form-model>
- </a-spin>
- </a-card>
- <!-- 页面底部提交取消 -->
- <div
- :style="{
- position: 'absolute',
- right: 0,
- bottom: 0,
- width: '100%',
- borderTop: '1px solid #e9e9e9',
- padding: '10px 16px',
- background: '#fff',
- textAlign: 'right',
- zIndex: 1
- }"
- >
- <a-button type="primary" @click="handleCancel">
- 关闭
- </a-button>
- </div>
- </a-drawer>
- </div>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import moment from 'moment'
- import { addAdvPac } from '@api/document/advance-packingList.js'
- import { queryShippingDetails } from '@api/document/advance-packingList.js'
- import { JVXETypes } from '@/components/jeecg/JVxeTable'
- import { pushIfNotExist, randomNumber, randomUUID } from '@/utils/util'
- import { getDotConfig, getDotValidExpress } from '@/utils/myutil'
- export default {
- name: 'AddAdvancePacking', // 新增预装箱单
- mixins: [JeecgListMixin],
- components: { JEllipsis, moment }, // 参照发运明细弹框
- data() {
- let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
- return {
- toolbarConfig: {
- // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮
- btn: []
- },
- // 表头
- columns: [
- {
- title: '账套',
- key: 'acSetNo',
- width: 120,
- fixed: 'left',
- type: JVXETypes.normal,
- },
- {
- title: '成衣工厂',
- key: 'garmentFactory',
- width: 120,
- fixed: 'left',
- type: JVXETypes.normal,
- },
- {
- title: 'HOD',
- key: 'hod',
- width: 120,
- fixed: 'left',
- type: JVXETypes.normal,
- },
- {
- title: 'STYLE NO.',
- key: 'styleNo',
- width: 120,
- type: JVXETypes.normal,
- },
- {
- title: 'PO NO.',
- key: 'poNo',
- width: 120,
- type: JVXETypes.normal,
- },
- {
- title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
- key: 'itemCode',
- width: 340,
- type: JVXETypes.normal,
- },
- {
- title: '分销点/DC/LABEL',
- key: 'distributionPoint',
- width: 180,
- type: JVXETypes.normal,
- },
- {
- title: 'PREPACK SKU',
- key: 'prepackSku',
- width: 140,
- type: JVXETypes.normal,
- insertAfter:true,
- },
- {
- title: '起始箱号',
- key: 'startingBoxNumber',
- width: 120,
- type: JVXETypes.normal ,
- },
- {
- title: '结束箱号',
- key: 'endCaseNumber',
- width: 140,
- type: JVXETypes.normal ,
- },
- {
- title: '颜色(中英文)',
- key: 'colour',
- width: 140,
- type: JVXETypes.normal ,
- },
- {
- title: '配码--根据U8订单来显示',
- key: 'withCode',
- width: 240,
- type: JVXETypes.normal ,
- },
- {
- title: '件数/箱',
- key: 'piecesBox',
- width: 90,
- type: JVXETypes.normal ,
- },
- {
- title: '箱数',
- key: 'boxNumber',
- width: 140,
- type: JVXETypes.normal ,
- },
- {
- title: '总件数',
- key: 'total',
- width: 140,
- type: JVXETypes.normal,
- },
- {
- title: '净重/箱',
- key: 'netWeight',
- width: 90,
- type: JVXETypes.normal,
- },
- {
- title: '总净重',
- key: 'totalNetWeight',
- width: 140,
- type: JVXETypes.normal,
- },
- {
- title: '毛重/箱',
- key: 'grossWeight',
- width: 120,
- type: JVXETypes.normal,
- },
- {
- title: '总毛重',
- key: 'totalGrossWeight',
- width: 140,
- type: JVXETypes.normal,
- },
- {
- title: '外箱长度',
- key: 'outerBoxLength',
- width: 120,
- type: JVXETypes.normal,
- },
- {
- title: '外箱宽度',
- key: 'outerBoxWidth',
- width: 140,
- type: JVXETypes.normal,
- },
- {
- title: '外箱高度',
- key: 'outerBoxHeight',
- type: JVXETypes.normal ,
- width: 140,
- },
- {
- title: '总体积',
- key: 'totalVolume',
- type: JVXETypes.normal ,
- width: 140,
-
- },
- {
- title: '净净重',
- key: 'netWeightToo',
- width: 120,
- type: JVXETypes.normal,
- },
- {
- title: '单价',
- key: 'unitPrice',
- width: 120,
- type: JVXETypes.normal,
- },
- {
- title: '总价',
- key: 'totalPrice',
- width: 120,
- type: JVXETypes.normal,
- },
- ],
- loading: false, // 表格加载
- visible: false,
- dateFormat: 'YYYY-MM-DD',
- addAdpacking: {
- syPreAssembledPackingListItemList:[]
- }, //主表信息
- confirmLoading: false,
- msgFormSon: 'test', // 子组件传来数据的变量
- // state: '0', // 单据状态初始未【仅保存】
- // pushState: '0' // 推送状态初始未【仅保存】
- // 待确定还有哪些必填信息 ----------------------------
- // validatorRules: {
- // orderNumber: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
- // styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
- // name: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
- // },
- sizeFields:[], // 尺码字段
- dotConfig:{}, // 小数点配置
- }
- },
- // 接收父组件查询方法
- props: {
- fatherList: {
- type: Function,
- default: null
- }
- },
- methods: {
- loadSizeTables(sizeTable){
- var newColums = this.columns.filter(item=>{
- return item.isSize != true;
- });
- this.sizeFields = [];
- if (sizeTable != null){
- var i=0;
- // 找到插入位置点
- for (; i<newColums.length;i++){
- if (newColums[i].insertAfter){
- break;
- }
- }
- // 插入数据
- for (var j=0;j<sizeTable.length;j++){
- this.sizeFields.push('size-'+sizeTable[j].size);
- var validExpress = getDotValidExpress(this.dotConfig.quantity);
- var field = {
- title: sizeTable[j].size,
- key: 'size-'+sizeTable[j].size,
- type: JVXETypes.normal ,
- width: 80,
- isSize:true,
- };
-
- newColums.splice(i+1+j,0,field);
- }
- }
-
- this.columns = newColums;
- },
- // 抽屉 取消
- handleCancel() {
- this.close()
- },
- close() {
- this.$emit('close')
- this.visible = false;
- this.addAdpacking = {syPreAssembledPackingListItemList:[]};
- },
- aa() {},
- },
- computed: {},
- mounted() {}
- }
- </script>
- <style lang="less" scoped>
- @import '~@assets/less/common.less';
- /deep/ .ant-table-thead > tr > th {
- text-align: center;
- // font-weight: 700;
- }
- /deep/ .ant-table-tbody {
- text-align: center;
- }
- // /deep/ th.replacecolor {
- // background-color: #ccc;
- // }
- // 抽屉里的card样式
- /deep/ .ant-drawer-content {
- background-color: #f0f2f5;
- }
- /deep/ .ant-drawer-body {
- padding: 10px;
- }
- </style>
|