123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588 |
- <template>
- <!-- 新增成衣 -->
- <div id="clothesAddDrawer">
- <a-drawer
- title="新增成衣"
- width="89%"
- placement="right"
- :closable="true"
- :visible="visible"
- @close="handleCancel">
- <!-- 主表信息 填写-->
- <a-card :bordered="true">
- <div class="table-page-search-wrapper">
- <a-form-model layout="inline" ref="form" :model="clothesAdd" :rules="validatorRules">
- <a-row :gutter="24">
- <a-col :md="6" :sm="8">
- <a-form-model-item label="订单号" prop="orderNum">
- <a-input placeholder="请输入订单号" v-model="clothesAdd.orderNum"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="款号" prop="styleNum">
- <a-input placeholder="请输入款号" v-model="clothesAdd.styleNum"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="品名" prop="name">
- <a-input placeholder="请输入品名" v-model="clothesAdd.name"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="尺码范围" prop="sizeRange">
- <a-input placeholder="请输入尺码范围" v-model="clothesAdd.sizeRange"></a-input>
- <!-- <a-select placeholder="请选择尺码范围">
- <a-select-option value="">请选择</a-select-option>
- <a-select-option value="0">客户1</a-select-option>
- <a-select-option value="1">客户2</a-select-option>
- <a-select-option value="2">客户3</a-select-option>
- </a-select> -->
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="客户" prop="customer">
- <a-input placeholder="请输入客户" v-model="clothesAdd.customer"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="集装箱代号" prop="containerCode">
- <a-input placeholder="请输入集装箱代号" v-model="clothesAdd.containerCode"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="集装箱号" prop="containerNo">
- <a-input placeholder="请输入集装箱号" v-model="clothesAdd.containerNo"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="备注" prop="note">
- <a-input placeholder="请输入备注" v-model="clothesAdd.note"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="成衣工厂" prop="clothesFactory">
- <a-input placeholder="请输入成衣工厂" v-model="clothesAdd.clothesFactory"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="外销发票号" prop="exportInvoiceNo">
- <a-input placeholder="请输入外销发票号" v-model="clothesAdd.exportInvoiceNo"></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="托书号" prop="bookNum">
- <a-input placeholder="请输入托书号" v-model="clothesAdd.bookNum"></a-input>
- </a-form-model-item>
- </a-col>
- </a-row>
- </a-form-model>
- </div>
- </a-card>
- <!--操作按钮区域 参照预装箱单 増行-->
- <a-card :bordered="true" style="margin:10px 0 60px 0;">
- <div class="table-operator">
- <a-button type="primary" @click="referadvancePackingList" icon="ordered-list">参照预装箱单</a-button>
- <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
- </div>
- <!-- 子表 :pagination="ipagination" -->
- <a-spin :spinning="confirmLoading">
- <a-form-model ref="formRef" :rules="validatorRules">
- <a-table
- bordered
- :row-key="record => record.id"
- :columns="clothesAddColumns"
- :data-source="clothesAddData"
- :loading="loading"
- :pagination="ipagination"
- :scroll="{ x: 1500 }"
- @change="handleTableChange"
- >
- <!-- 启始箱号 输入框-->
- <template slot="inceptionBoxNo" slot-scope="text, record, index">
- <a-form-model-item prop="inceptionBoxNo" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.inceptionBoxNo" />
- </a-form-model-item>
- </template>
- <!-- 结束箱号 输入框-->
- <template slot="endBoxNo" slot-scope="text, record, index">
- <a-form-model-item prop="endBoxNo" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.endBoxNo" />
- </a-form-model-item>
- </template>
- <!-- 件数/箱 输入框-->
- <template slot="packagesBox" slot-scope="text, record, index">
- <a-form-model-item prop="packagesBox" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.packagesBox" />
- </a-form-model-item>
- </template>
- <!--箱数 输入框-->
- <template slot="boxes" slot-scope="text, record, index">
- <a-form-model-item prop="boxes" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.boxes" />
- </a-form-model-item>
- </template>
- <!--净重/箱 输入框-->
- <template slot="suttle" slot-scope="text, record, index">
- <a-form-model-item prop="suttle" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.suttle" />
- </a-form-model-item>
- </template>
- <!--毛重/箱 输入框-->
- <template slot="roughWeight" slot-scope="text, record, index">
- <a-form-model-item prop="roughWeight" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.roughWeight" />
- </a-form-model-item>
- </template>
- <!--外箱长度 输入框-->
- <template slot="boxLength" slot-scope="text, record, index">
- <a-form-model-item prop="boxLength" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.boxLength" />
- </a-form-model-item>
- </template>
- <!--外箱宽度 输入框-->
- <template slot="boxWidth" slot-scope="text, record, index">
- <a-form-model-item prop="boxWidth" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.boxWidth" />
- </a-form-model-item>
- </template>
- <!--外箱高度 输入框-->
- <template slot="boxHeight" slot-scope="text, record, index">
- <a-form-model-item prop="boxHeight" :rules="rules.styleNum" required>
- <a-input style="width:100%" type="text" v-model="record.boxHeight" />
- </a-form-model-item>
- </template>
- <!-- 操作 -->
- <span slot="operationSlot" slot-scope="text, record">
- <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
- <a href="javascript:void(0);" style="color:red;">删除</a>
- </a-popconfirm>
- <a-divider type="vertical" />
- <a @click="copy(record)">复制</a>
- </span>
- </a-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-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
- <a-button :style="{ marginRight: '8px' }">取消</a-button>
- </a-popconfirm>
- <a-button type="primary" @click="submitAdd">
- 提交
- </a-button>
- </div>
- </a-drawer>
- <!-- 参照预装箱单 -->
- <advancePackingList-modal ref="advancePackingListModal" :father="aa" @ok="modalFormOk"></advancePackingList-modal>
- </div>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import AdvancePackingListModal from '@views/pre-book/advancePackingListModal.vue'
- export default {
- name: 'ClothesAddDrawer', // 新增-装箱单 -成衣
- mixins: [JeecgListMixin],
- computed: {},
- components: { AdvancePackingListModal, JEllipsis }, // 参照预装箱单 弹框
- data() {
- let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
- return {
- // 表头
- clothesAddColumns: [
- {
- title: '账套',
- dataIndex: 'accountSet',
- width: 160,
- fixed: 'left',
- className: 'replacecolor'
- },
- {
- title: '成衣工厂',
- dataIndex: 'clothesFactory',
- width: 120,
- fixed: 'left',
- className: 'replacecolor'
- },
- {
- title: 'HOD',
- dataIndex: 'hod',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: 'STYLE NO.',
- dataIndex: 'styleNo',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: 'PO NO.',
- dataIndex: 'poNo',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
- dataIndex: 'itemNo',
- width: 340,
- className: 'replacecolor'
- },
- {
- title: '分销点/DC/LABEL',
- dataIndex: 'dcLabel',
- width: 200,
- className: 'replacecolor'
- },
- {
- title: 'S',
- dataIndex: 's',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: 'M',
- dataIndex: 'm',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: 'L',
- dataIndex: 'l',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: 'XL',
- dataIndex: 'xl',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: 'XXL',
- dataIndex: 'xxl',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '3XL',
- dataIndex: '3xl',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '启始箱号',
- dataIndex: 'inceptionBoxNo',
- scopedSlots: { customRender: 'inceptionBoxNo' },
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '结束箱号',
- dataIndex: 'endBoxNo',
- width: 120,
- scopedSlots: { customRender: 'endBoxNo' },
- className: 'replacecolor'
- },
- {
- title: '颜色(中英文)',
- dataIndex: 'colorChUsa',
- width: 140,
- className: 'replacecolor'
- },
- {
- title: '配码',
- dataIndex: 'configCode',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '件数/箱',
- dataIndex: 'packagesBox',
- width: 120,
- scopedSlots: { customRender: 'packagesBox' },
- className: 'replacecolor'
- },
- {
- title: '箱数',
- dataIndex: 'boxes',
- width: 120,
- scopedSlots: { customRender: 'boxes' },
- className: 'replacecolor'
- },
- {
- title: '总件数',
- dataIndex: 'totalPackagesNum',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '净重/箱',
- dataIndex: 'suttle',
- width: 120,
- scopedSlots: { customRender: 'suttle' },
- className: 'replacecolor'
- },
- {
- title: '总净重',
- dataIndex: 'totalSuttle',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '毛重/箱',
- dataIndex: 'roughWeight',
- width: 120,
- scopedSlots: { customRender: 'roughWeight' },
- className: 'replacecolor'
- },
- {
- title: '总毛重',
- dataIndex: 'totalRoughWeigh',
- width: 90,
- className: 'replacecolor'
- },
- {
- title: '外箱长度',
- dataIndex: 'boxLength',
- width: 120,
- scopedSlots: { customRender: 'boxLength' },
- className: 'replacecolor'
- },
- {
- title: '外箱宽度',
- dataIndex: 'boxWidth',
- width: 120,
- scopedSlots: { customRender: 'boxWidth' },
- className: 'replacecolor'
- },
- {
- title: '外箱高度',
- dataIndex: 'boxHeight',
- width: 120,
- scopedSlots: { customRender: 'boxHeight' },
- className: 'replacecolor'
- },
- {
- title: '总体积',
- dataIndex: 'totalVolume',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '净净重',
- dataIndex: 'netNetWeight',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '单价',
- dataIndex: 'price',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '总价',
- dataIndex: 'totalPrices',
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '备注',
- dataIndex: 'note',
- width: 140,
- customRender: t => ellipsis(t),
- fixed: 'right',
- className: 'replacecolor'
- },
- {
- title: '操作',
- dataIndex: 'operation',
- scopedSlots: { customRender: 'operationSlot' },
- width: 160,
- fixed: 'right',
- className: 'replacecolor'
- }
- ],
- clothesAddData: [{}, {}, {}],
- loading: false, // 表格加载
- clothesAdd: {},
- visible: false,
- confirmLoading: false,
- validatorRules: {
- orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
- styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
- name: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
- // 待确定还有哪些必填信息
- }
- // dateFormat: 'YYYY-MM-DD'
- }
- },
- created() {},
- mounted() {},
- methods: {
- // 参照预装箱单
- referadvancePackingList() {
- console.log('打开参照订单数据')
- // 打开订单数据弹框
- this.$refs.advancePackingListModal.advancePackingListModVis = true
- },
- // 増行
- handleAddColumn() {
- console.log('増行')
- const addrow = {
- accountSet: '',
- clothesFactory: '',
- hod: '',
- styleNo: '',
- poNo: '',
- itemNo: '',
- dcLabel: '',
- s: '',
- m: '',
- l: '',
- xl: '',
- xxl: '',
- xxxl: '',
- inceptionBoxNo: '',
- endBoxNo: '',
- colorChUsa: '',
- configCode: '',
- packagesBox: '',
- boxes: '',
- totalPackagesNum: '',
- suttle: '',
- totalSuttle: '',
- roughWeight: '',
- totalRoughWeigh: '',
- boxLength: '',
- boxWidth: '',
- boxHeight: '',
- totalVolume: '',
- netNetWeight: '',
- price: '',
- totalPrices: '',
- note: '',
- operation: ''
- }
- this.clothesAddData.push(addrow)
- },
- // -------------------------------------
- // 操作 删除
- handleDelete(id) {
- console.log('id:', id)
- },
- // 操作按钮 复制
- copy(record) {},
- // -------------------------------------
- // 抽屉 取消
- handleCancel() {
- console.log('点击抽屉取消')
- this.close()
- },
- // 抽屉 提交
- submitAdd() {
- console.log('保存新增、刷新发运明细列表')
- const that = this
- // 触发表单验证
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true
- }
- })
- this.close()
- // this.getShipmentList() // 刷新 装箱单-成衣列表
- },
- // -------------------------------------
- close() {
- this.$emit('close')
- this.visible = false
- this.$refs.form.resetFields()
- },
- // - father------------------------------------
- aa() {},
- modalFormOk() {}
- // 分页、排序、筛选变化时触发
- // handleTableChange(pagination, filters, sorter) {
- // // console.log('当前页信息>>>>',pagination)
- // this.queryParam.pageNo = pagination.current
- // this.getAnnList()
- // }'
- }
- }
- </script>
- <style lang="less" scoped>
- @import '~@assets/less/common.less';
- @import '~@assets/less/overwriter.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>
|