|
@@ -0,0 +1,525 @@
|
|
|
+<template>
|
|
|
+ <!-- 新增面料 装箱单 -->
|
|
|
+ <div id="addFabricDrawer">
|
|
|
+ <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="addFabric" :rules="validatorRules">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="单号" prop="oddNum">
|
|
|
+ <a-input placeholder="请输入单号" v-model="addFabric.oddNum"></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="addFabric.containerNo"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="装柜日期" prop="loadingDate">
|
|
|
+ <a-date-picker
|
|
|
+ placeholder="请选择装柜日期"
|
|
|
+ :format="dateFormat"
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="addFabric.loadingDate"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="成衣工厂" prop="clothesFactory">
|
|
|
+ <a-input placeholder="请输入成衣工厂" v-model="addFabric.clothesFactory"></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="invoiceNum">
|
|
|
+ <a-input placeholder="请输入发票号" v-model="addFabric.invoiceNum"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="制单人" prop="preparedBy">
|
|
|
+ <a-input placeholder="请输入制单人" v-model="addFabric.preparedBy"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="制单日期" prop="preparedDate">
|
|
|
+ <a-date-picker
|
|
|
+ placeholder="请选择制单日期"
|
|
|
+ :format="dateFormat"
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="addFabric.preparedDate"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="外销发票号" prop="exportInvoiceNo">
|
|
|
+ <a-input placeholder="请输入外销发票号" v-model="addFabric.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="addFabric.bookNum"></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="addFabric.note"></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>
|
|
|
+
|
|
|
+ <!-- 子表 -->
|
|
|
+ <a-spin :spinning="confirmLoading">
|
|
|
+ <a-form-model ref="formRef" :rules="validatorRules">
|
|
|
+ <a-table
|
|
|
+ bordered
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :columns="addFabricColumns"
|
|
|
+ :data-source="addFabricData"
|
|
|
+ :loading="loading"
|
|
|
+ :pagination="ipagination"
|
|
|
+ :scroll="{ x: 1500 }"
|
|
|
+ @change="handleTableChange"
|
|
|
+ >
|
|
|
+ <!-- 操作 -->
|
|
|
+ <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>
|
|
|
+ </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>
|
|
|
+
|
|
|
+ <!-- 参照发运明细弹框 -->
|
|
|
+ <referShipDetails-modal ref="referShipDetailsModal" :father="aa" @ok="modalFormOk"></referShipDetails-modal>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
+import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
+import referShipDetailsModal from '@views/packing-list/packinglist-fabrics/referShipDetailsModal.vue'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'AddFabricDrawer', // 新增 装箱单 -面料
|
|
|
+ mixins: [JeecgListMixin],
|
|
|
+ computed: {},
|
|
|
+ components: { JEllipsis, referShipDetailsModal }, // 参照发运明细 弹框
|
|
|
+ data() {
|
|
|
+ let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
|
|
|
+ return {
|
|
|
+ // 表头
|
|
|
+ addFabricColumns: [
|
|
|
+ {
|
|
|
+ title: '业务员 Merchandiser',
|
|
|
+ dataIndex: 'merchandiser',
|
|
|
+ width: 120,
|
|
|
+ fixed: 'left',
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '计划单号',
|
|
|
+ dataIndex: 'planNum',
|
|
|
+ width: 160,
|
|
|
+ fixed: 'left',
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '款号/Kimball',
|
|
|
+ dataIndex: 'Kimball',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '缸号/Batch no.',
|
|
|
+ dataIndex: 'batchNo',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '颜色/Color',
|
|
|
+ dataIndex: 'color',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '项目/Item(存货编码)',
|
|
|
+ dataIndex: 'itemCode',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '存货名称(辅料名称)',
|
|
|
+ dataIndex: 'inventoryName',
|
|
|
+ width: 160,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '报关品名',
|
|
|
+ dataIndex: 'declarationName',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '成分/Composition',
|
|
|
+ dataIndex: 'composition',
|
|
|
+ width: 150,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '门幅/Width',
|
|
|
+ dataIndex: 'larghezza',
|
|
|
+ width: 140,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '匹数/Rolls',
|
|
|
+ dataIndex: 'rolls',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '毛重/GW/kg',
|
|
|
+ dataIndex: 'roughWeigh',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '净重/NW/kg',
|
|
|
+ dataIndex: 'suttle',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '染后重',
|
|
|
+ dataIndex: 'postDyeingWweight',
|
|
|
+ width: 90,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '拷布重',
|
|
|
+ dataIndex: 'clothWeight',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '米数/Length/m',
|
|
|
+ dataIndex: '米数',
|
|
|
+ width: 130,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '价格',
|
|
|
+ dataIndex: 'price',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '克重/G',
|
|
|
+ dataIndex: 'gramWeight',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '供应商编码(染厂)',
|
|
|
+ dataIndex: 'supplierCodeDye',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '供应商(染厂)',
|
|
|
+ dataIndex: 'supplierDye',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '供应商编码(印厂)',
|
|
|
+ dataIndex: 'supplierCodePrint',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '供应商(印厂)',
|
|
|
+ dataIndex: 'supplierPrint',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '包装方式',
|
|
|
+ dataIndex: 'packingWay ',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '处理方式',
|
|
|
+ dataIndex: 'treatmentMethod',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '是否手册纱',
|
|
|
+ dataIndex: 'isManualYarn',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '手册纱单价',
|
|
|
+ dataIndex: 'manualYarnPrice',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '柜号',
|
|
|
+ dataIndex: 'containerNum',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '备注',
|
|
|
+ dataIndex: 'note',
|
|
|
+ width: 160,
|
|
|
+ customRender: t => ellipsis(t),
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '入库数量',
|
|
|
+ dataIndex: 'inQuantity',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '规格型号',
|
|
|
+ dataIndex: 'specificationsModels',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '实际报关数量',
|
|
|
+ dataIndex: 'actualDeclaredQuantity',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '超发',
|
|
|
+ dataIndex: 'superHair',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单位',
|
|
|
+ dataIndex: 'unit',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '备注(U8)',
|
|
|
+ dataIndex: 'noteU8',
|
|
|
+ width: 160,
|
|
|
+ fixed: 'right',
|
|
|
+ customRender: t => ellipsis(t),
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'operation',
|
|
|
+ scopedSlots: { customRender: 'operationSlot' },
|
|
|
+ width: 120,
|
|
|
+ fixed: 'right',
|
|
|
+ className: 'replacecolor'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ addFabricData: [{}, {}, {}],
|
|
|
+ loading: false, // 表格加载
|
|
|
+ addFabric: {},
|
|
|
+ visible: false,
|
|
|
+ confirmLoading: false,
|
|
|
+ validatorRules: {
|
|
|
+ oddNum: [{ required: true, message: '单号不能为空', trigger: 'blur' }],
|
|
|
+ containerNo: [{ required: true, message: '款号不能为空', trigger: 'blur' }]
|
|
|
+ // 待确定还有哪些必填信息
|
|
|
+ },
|
|
|
+ dateFormat: 'YYYY-MM-DD'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ // 参照发运明细 弹框
|
|
|
+ referadvancePackingList() {
|
|
|
+ console.log('打开参照发运明细 弹框')
|
|
|
+ this.$refs.referShipDetailsModal.referShipDetailsModVis = 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.addFabricData.push(addrow)
|
|
|
+ },
|
|
|
+
|
|
|
+ // -------------------------------------
|
|
|
+ // 操作 删除
|
|
|
+ handleDelete(id) {
|
|
|
+ console.log('id:', id)
|
|
|
+ },
|
|
|
+ // -------------------------------------
|
|
|
+
|
|
|
+ // 抽屉 取消
|
|
|
+ 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>
|