|
@@ -9,13 +9,13 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="单号" prop="oddNum">
|
|
|
- <a-input placeholder="请输入单号" v-model="addFabric.documentNo"></a-input>
|
|
|
+ <a-input placeholder="自动生成" v-model="addFabric.documentNo"></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.containerNumber"></a-input>
|
|
|
+ <a-input placeholder="选择子表自动生成" v-model="addFabric.containerNumber"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -99,7 +99,6 @@
|
|
|
<a-form-model ref="formRef" :rules="validatorRules">
|
|
|
<a-table
|
|
|
bordered
|
|
|
- :row-key="record => record.id"
|
|
|
:columns="addFabricColumns"
|
|
|
:data-source="addFabricData"
|
|
|
:loading="loading"
|
|
@@ -113,6 +112,112 @@
|
|
|
<a href="javascript:void(0);" style="color:red;">删除</a>
|
|
|
</a-popconfirm>
|
|
|
</span>
|
|
|
+
|
|
|
+ <!-- 缸号 -->
|
|
|
+ <template slot="dyelotNumber" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="dyelotNumber">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.dyelotNumber" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 门幅 -->
|
|
|
+ <template slot="width" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="width">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.width" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 匹数 -->
|
|
|
+ <template slot="rolls" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="rolls">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.rolls" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 毛重 -->
|
|
|
+ <template slot="grossWeight" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="grossWeight">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.grossWeight" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 净重 -->
|
|
|
+ <template slot="netWeight" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="netWeight">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.netWeight" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 染后重 -->
|
|
|
+ <template slot="afterHeavy" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="afterHeavy">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.afterHeavy" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 拷布重 -->
|
|
|
+ <template slot="kaoClothWeight" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="kaoClothWeight">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.kaoClothWeight" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 供应商编码 (染厂)-->
|
|
|
+ <template slot="supplierCodeDyeingPlant" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="supplierCodeDyeingPlant">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.supplierCodeDyeingPlant" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 供应商(染厂) -->
|
|
|
+ <template slot="supplierDyeingPlant" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="supplierDyeingPlant">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.supplierDyeingPlant" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 供应商编码(印厂) -->
|
|
|
+ <template slot="supplierCodePrintingPlant" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="supplierCodePrintingPlant">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.supplierCodePrintingPlant" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 供应商(印厂) -->
|
|
|
+ <template slot="supplierPrintingPlant" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="supplierPrintingPlant">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.supplierPrintingPlant" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 包装方式 -->
|
|
|
+ <template slot="mannerOfPacking" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="mannerOfPacking">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.mannerOfPacking" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 柜号 -->
|
|
|
+ <template slot="containerNumber" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="containerNumber">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.containerNumber" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 入库数量 -->
|
|
|
+ <template slot="inventoryQuantity" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="inventoryQuantity">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.inventoryQuantity" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 实际报关数量 -->
|
|
|
+ <template slot="actualDeclaredQuantity" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="actualDeclaredQuantity">
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.actualDeclaredQuantity" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+
|
|
|
</a-table>
|
|
|
</a-form-model>
|
|
|
</a-spin>
|
|
@@ -147,7 +252,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
-import { getShippingDetailId} from '@api/document/packing-list/packinglist-fabrics'
|
|
|
+import { getShippingDetailId,addFabricList} from '@api/document/packing-list/packinglist-fabrics'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import referShipDetailsModal from '@views/packing-list/packinglist-fabrics/referShipDetailsModal.vue'
|
|
|
|
|
@@ -156,6 +261,12 @@ export default {
|
|
|
mixins: [JeecgListMixin],
|
|
|
computed: {},
|
|
|
components: { JEllipsis, referShipDetailsModal }, // 参照发运明细 弹框
|
|
|
+ props: {
|
|
|
+ fatherList: {
|
|
|
+ type: Function,
|
|
|
+ default: null
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
|
|
|
return {
|
|
@@ -163,40 +274,41 @@ export default {
|
|
|
addFabricColumns: [
|
|
|
{
|
|
|
title: '业务员 Merchandiser',
|
|
|
- dataIndex: 'merchandiser',
|
|
|
+ dataIndex: 'salesman',
|
|
|
width: 120,
|
|
|
fixed: 'left',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '计划单号',
|
|
|
- dataIndex: 'planNum',
|
|
|
+ dataIndex: 'planLotNumber',
|
|
|
width: 160,
|
|
|
fixed: 'left',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '款号/Kimball',
|
|
|
- dataIndex: 'Kimball',
|
|
|
+ dataIndex: 'itemNumber',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '缸号/Batch no.',
|
|
|
- dataIndex: 'batchNo',
|
|
|
+ dataIndex: 'dyelotNumber',
|
|
|
+ scopedSlots: { customRender: 'dyelotNumber' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '颜色/Color',
|
|
|
- dataIndex: 'color',
|
|
|
+ dataIndex: 'colour',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '项目/Item(存货编码)',
|
|
|
- dataIndex: 'itemCode',
|
|
|
+ dataIndex: 'inventoryCode',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -223,44 +335,50 @@ export default {
|
|
|
|
|
|
{
|
|
|
title: '门幅/Width',
|
|
|
- dataIndex: 'larghezza',
|
|
|
+ dataIndex: 'width',
|
|
|
+ scopedSlots: { customRender: 'width' },
|
|
|
width: 140,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '匹数/Rolls',
|
|
|
dataIndex: 'rolls',
|
|
|
+ scopedSlots: { customRender: 'rolls' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '毛重/GW/kg',
|
|
|
- dataIndex: 'roughWeigh',
|
|
|
+ dataIndex: 'grossWeight',
|
|
|
+ scopedSlots: { customRender: 'grossWeight' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '净重/NW/kg',
|
|
|
- dataIndex: 'suttle',
|
|
|
+ scopedSlots: { customRender: 'netWeight' },
|
|
|
+ dataIndex: 'netWeight',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '染后重',
|
|
|
- dataIndex: 'postDyeingWweight',
|
|
|
+ dataIndex: 'afterHeavy',
|
|
|
+ scopedSlots: { customRender: 'afterHeavy' },
|
|
|
width: 90,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '拷布重',
|
|
|
- dataIndex: 'clothWeight',
|
|
|
+ dataIndex: 'kaoClothWeight',
|
|
|
+ scopedSlots: { customRender: 'kaoClothWeight' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '米数/Length/m',
|
|
|
- dataIndex: '米数',
|
|
|
+ dataIndex: 'meter',
|
|
|
width: 130,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -278,31 +396,36 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '供应商编码(染厂)',
|
|
|
- dataIndex: 'supplierCodeDye',
|
|
|
+ dataIndex: 'supplierCodeDyeingPlant',
|
|
|
+ scopedSlots: { customRender: 'supplierCodeDyeingPlant' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '供应商(染厂)',
|
|
|
- dataIndex: 'supplierDye',
|
|
|
+ dataIndex: 'supplierDyeingPlant',
|
|
|
+ scopedSlots: { customRender: 'supplierDyeingPlant' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '供应商编码(印厂)',
|
|
|
- dataIndex: 'supplierCodePrint',
|
|
|
+ scopedSlots: { customRender: 'supplierCodePrintingPlant' },
|
|
|
+ dataIndex: 'supplierCodePrintingPlant',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '供应商(印厂)',
|
|
|
- dataIndex: 'supplierPrint',
|
|
|
+ dataIndex: 'supplierPrintingPlant',
|
|
|
+ scopedSlots: { customRender: 'supplierPrintingPlant' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '包装方式',
|
|
|
- dataIndex: 'packingWay ',
|
|
|
+ dataIndex: 'mannerOfPacking ',
|
|
|
+ scopedSlots: { customRender: 'mannerOfPacking' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -314,69 +437,72 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '是否手册纱',
|
|
|
- dataIndex: 'isManualYarn',
|
|
|
+ dataIndex: 'manualYarnFlag',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '手册纱单价',
|
|
|
- dataIndex: 'manualYarnPrice',
|
|
|
+ dataIndex: 'manualYarnUnitPrice',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '手册纱占比%',
|
|
|
- dataIndex: 'aa',
|
|
|
+ dataIndex: 'manualYarnProportion',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '柜号',
|
|
|
- dataIndex: 'containerNum',
|
|
|
+ dataIndex: 'containerNumber',
|
|
|
+ scopedSlots: { customRender: 'containerNumber' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '备注',
|
|
|
- dataIndex: 'note',
|
|
|
+ dataIndex: 'memo',
|
|
|
width: 160,
|
|
|
customRender: t => ellipsis(t),
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '入库数量',
|
|
|
- dataIndex: 'inQuantity',
|
|
|
+ dataIndex: 'inventoryQuantity',
|
|
|
+ scopedSlots: { customRender: 'inventoryQuantity' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '规格型号',
|
|
|
- dataIndex: 'specificationsModels',
|
|
|
+ dataIndex: 'specificationAndModel',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '实际报关数量',
|
|
|
dataIndex: 'actualDeclaredQuantity',
|
|
|
+ scopedSlots: { customRender: 'actualDeclaredQuantity' },
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '超发',
|
|
|
- dataIndex: 'superHair',
|
|
|
+ dataIndex: 'excessQuantity',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '单位',
|
|
|
- dataIndex: 'unit',
|
|
|
+ dataIndex: 'masterMetering',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '备注(U8)',
|
|
|
- dataIndex: 'noteU8',
|
|
|
+ dataIndex: 'remarks2',
|
|
|
width: 160,
|
|
|
fixed: 'right',
|
|
|
customRender: t => ellipsis(t),
|
|
@@ -398,8 +524,8 @@ export default {
|
|
|
visible: false,
|
|
|
confirmLoading: false,
|
|
|
validatorRules: {
|
|
|
- oddNum: [{ required: true, message: '单号不能为空', trigger: 'blur' }],
|
|
|
- containerNo: [{ required: true, message: '款号不能为空', trigger: 'blur' }]
|
|
|
+ // oddNum: [{ required: true, message: '单号不能为空', trigger: 'blur' }],
|
|
|
+ // containerNo: [{ required: true, message: '款号不能为空', trigger: 'blur' }]
|
|
|
// 待确定还有哪些必填信息
|
|
|
},
|
|
|
dateFormat: 'YYYY-MM-DD'
|
|
@@ -414,11 +540,11 @@ export default {
|
|
|
this.$refs.referShipDetailsModal.referShipDetailsModVis = true
|
|
|
this.$refs.referShipDetailsModal.getReferenceList()
|
|
|
},
|
|
|
- getFabricData(rowsId) {
|
|
|
+ getFabricData(rowsId,token) {
|
|
|
this.addFabric = {}
|
|
|
this.addFabricData = []
|
|
|
- var ids = rowsId.toString(rowsId)
|
|
|
- getShippingDetailId({ids:ids}).then(res => {
|
|
|
+ var ids = rowsId.toString()
|
|
|
+ getShippingDetailId({ids:ids,token:token}).then(res => {
|
|
|
if (res.success) {
|
|
|
var data = res.result
|
|
|
this.addFabric ={
|
|
@@ -432,7 +558,7 @@ export default {
|
|
|
shippingOrderNumber : data.shippingOrderNumber,
|
|
|
remarks : data.remarks
|
|
|
}
|
|
|
- this.addFabricData = data.syPackingListFabricItem
|
|
|
+ this.addFabricData = data.syPackingListFabricItem
|
|
|
}else {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
@@ -498,7 +624,31 @@ export default {
|
|
|
// 触发表单验证
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
- that.confirmLoading = true
|
|
|
+ // that.confirmLoading = true
|
|
|
+ var newObj = {
|
|
|
+ documentNo:this.addFabric.documentNo,
|
|
|
+ containerNumber:this.addFabric.containerNumber,
|
|
|
+ latestDateOfShipment:this.addFabric.latestDateOfShipment,
|
|
|
+ garmentFactory:this.addFabric.garmentFactory,
|
|
|
+ invoiceNo:this.addFabric.invoiceNo,
|
|
|
+ preparedBy:this.addFabric.preparedBy,
|
|
|
+ preparedDate:this.addFabric.preparedDate,
|
|
|
+ exportInvoiceNo:this.addFabric.exportInvoiceNo,
|
|
|
+ shippingOrderNumber:this.addFabric.shippingOrderNumber,
|
|
|
+ memo:this.addFabric.remarks,
|
|
|
+ syPackingListFabricItem:this.addFabricData
|
|
|
+ }
|
|
|
+ addFabricList(newObj).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('新增成功')
|
|
|
+ this.close()
|
|
|
+ //清空信息
|
|
|
+ newObj = {};
|
|
|
+ that.fatherList() // 调用父组件 查询方法
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
this.close()
|
|
@@ -509,6 +659,8 @@ export default {
|
|
|
close() {
|
|
|
this.$emit('close')
|
|
|
this.visible = false
|
|
|
+ this.addFabric = {}
|
|
|
+ this.addFabricData = []
|
|
|
this.$refs.form.resetFields()
|
|
|
},
|
|
|
// - father------------------------------------
|