|
@@ -14,27 +14,9 @@
|
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
@change="handleTableChange"
|
|
|
>
|
|
|
- <template slot="outsourcing" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="outsourcing" class='sonItem'>
|
|
|
- <a-select v-model="record.outsourcing" style='width:100%' @change="changeOut" :disabled="allowEdit=='no'&&allowEditMaterial=='no'&&!record.newRow" >
|
|
|
- <a-select-option value='是'> 是</a-select-option>
|
|
|
- <a-select-option value='否'> 否</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="projectCode" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="projectCode" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.projectCode" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="projectName" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="projectName" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.projectName" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
<template slot="batch" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="batch" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.batch" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.batch" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="inventoryCode" slot-scope="text, record, index">
|
|
@@ -42,169 +24,135 @@
|
|
|
<a-input-search placeholder="请输入" v-model="record.inventoryCode" @search="onSearchInven(record)" readOnly ></a-input-search>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
- <template slot="inventoryName" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="inventoryName" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.inventoryName" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="unit" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="unit" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.unit" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
<template slot="quantity" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="quantity" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.quantity" :disabled="allowEdit=='no'&&!record.newRow&&!record.copied" @blur="changeQuantity(record)"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="auxiliaryUnit" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="auxiliaryUnit" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.auxiliaryUnit" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.quantity" @blur="changeQuantity(record)"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="unQuantity" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="unQuantity" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.unQuantity" :disabled="allowEdit=='no'&&!record.newRow&&!record.copied" @blur="changeUQuantity(record)"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <!-- <template slot="unQuantityExecute" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="unQuantityExecute" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.unQuantityExecute"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="quantityExecute" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="quantityExecute" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.quantityExecute"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
- <template slot="specs" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="specs" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.specs" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.unQuantity" @blur="changeUQuantity(record)"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="model" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="model" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.model" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.model" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="color" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="color" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.color" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.color"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
- <template slot="colorStorage" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="colorStorage" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.colorStorage" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <template slot="fixedNum" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="fixedNum" class='sonItem'>
|
|
|
+ <a-input placeholder="请输入" v-model="record.fixedNum"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="fixedLength" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="fixedLength" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.fixedLength" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.fixedLength" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
- <template slot="alloy" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="alloy" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.alloy" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <template slot="widthHeight" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="widthHeight" class='sonItem'>
|
|
|
+ <a-input placeholder="请输入" v-model="record.widthHeight" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
- <template slot="standard" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="standard" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.standard" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <template slot="pieces" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="pieces" class='sonItem'>
|
|
|
+ <a-input placeholder="请输入" v-model="record.pieces"></a-input>
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+ <template slot="remarks" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="remarks" class='sonItem'>
|
|
|
+ <a-input placeholder="请输入" v-model="record.remarks" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="meterWeight" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="meterWeight" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.meterWeight" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.meterWeight" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="decorationLength" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="decorationLength" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.decorationLength" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.decorationLength" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="windowNo" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="windowNo" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.windowNo" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.windowNo" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="exclusiveZone" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="exclusiveZone" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.exclusiveZone" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.exclusiveZone" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
- <template slot="width" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="width" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.width" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <template slot="widthLength" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="widthLength" class='sonItem'>
|
|
|
+ <a-input placeholder="请输入" v-model="record.widthLength" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="height" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="height" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.height" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.height" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="buildingNumber" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="buildingNumber" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.buildingNumber" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.buildingNumber"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="framesTang" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="framesTang" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.framesTang" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.framesTang" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="framesCount" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="framesCount" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.framesCount" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.framesCount" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="leafCount" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="leafCount" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.leafCount" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.leafCount" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="semiClass" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="semiClass" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.semiClass" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.semiClass" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="area" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="area" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.area" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.area" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="cuttingLength" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="cuttingLength" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.cuttingLength" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.cuttingLength" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="cuttingLeftDown" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="cuttingLeftDown" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.cuttingLeftDown" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.cuttingLeftDown"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="cuttingRightTop" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="cuttingRightTop" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.cuttingRightTop" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="remarks" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="remarks" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.remarks" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.cuttingRightTop" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
+
|
|
|
<template slot="series" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="series" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.series" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.series" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
<template slot="glassNumber" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="glassNumber" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.glassNumber" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </template>
|
|
|
- <template slot="storageLocation" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="storageLocation" class='sonItem'>
|
|
|
- <a-input placeholder="请输入" v-model="record.storageLocation" :disabled="allowEdit=='no'&&!record.newRow"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model="record.glassNumber"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
</a-table>
|
|
@@ -231,8 +179,7 @@
|
|
|
selectedRowKeys:[],
|
|
|
selectedRows:[],
|
|
|
dataSource:[],
|
|
|
- allowEdit:'yes',
|
|
|
- allowEditMaterial:'no',
|
|
|
+ planOrg:'',
|
|
|
columns: [
|
|
|
{
|
|
|
title: '#',
|
|
@@ -244,26 +191,17 @@
|
|
|
return parseInt(index)+1;
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- title: '是否委外',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'outsourcing',
|
|
|
- ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'outsourcing' }
|
|
|
- },
|
|
|
{
|
|
|
title: '项目编码',
|
|
|
align:"center",
|
|
|
dataIndex: 'projectCode',
|
|
|
ellipsis: true,
|
|
|
- // scopedSlots: { customRender: 'projectCode' }
|
|
|
},
|
|
|
{
|
|
|
title: '项目名称',
|
|
|
align:"center",
|
|
|
dataIndex: 'projectName',
|
|
|
ellipsis: true,
|
|
|
- // scopedSlots: { customRender: 'projectName' }
|
|
|
},
|
|
|
{
|
|
|
title: '批次',
|
|
@@ -273,7 +211,7 @@
|
|
|
scopedSlots: { customRender: 'batch' }
|
|
|
},
|
|
|
{
|
|
|
- title: '存货编码',
|
|
|
+ title: '料品编码',
|
|
|
align:"center",
|
|
|
dataIndex: 'inventoryCode',
|
|
|
ellipsis: true,
|
|
@@ -281,35 +219,36 @@
|
|
|
|
|
|
},
|
|
|
{
|
|
|
- title: '存货名称',
|
|
|
+ title: '料品名称',
|
|
|
align:"center",
|
|
|
dataIndex: 'inventoryName',
|
|
|
ellipsis: true,
|
|
|
- // scopedSlots: { customRender: 'inventoryName' }
|
|
|
-
|
|
|
},
|
|
|
{
|
|
|
- title: '计量单位',
|
|
|
+ title: '料品属性',
|
|
|
align:"center",
|
|
|
- dataIndex: 'unit',
|
|
|
+ dataIndex: 'attribute',
|
|
|
ellipsis: true,
|
|
|
- // scopedSlots: { customRender: 'unit' }
|
|
|
-
|
|
|
},
|
|
|
{
|
|
|
- title: '主数量',
|
|
|
+ title: '计量单位',
|
|
|
align:"center",
|
|
|
- dataIndex: 'quantity',
|
|
|
+ dataIndex: 'unit',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'quantity' }
|
|
|
-
|
|
|
},
|
|
|
{
|
|
|
title: '辅计量单位',
|
|
|
align:"center",
|
|
|
dataIndex: 'auxiliaryUnit',
|
|
|
ellipsis: true,
|
|
|
- // scopedSlots: { customRender: 'auxiliaryUnit' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '主数量',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'quantity',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: { customRender: 'quantity' }
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
title: '辅数量',
|
|
@@ -355,11 +294,11 @@
|
|
|
|
|
|
},
|
|
|
{
|
|
|
- title: '入库颜色',
|
|
|
+ title: '支数',
|
|
|
align:"center",
|
|
|
- dataIndex: 'colorStorage',
|
|
|
+ dataIndex: 'fixedNum',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'colorStorage' }
|
|
|
+ scopedSlots: { customRender: 'fixedNum' }
|
|
|
|
|
|
},
|
|
|
{
|
|
@@ -370,18 +309,25 @@
|
|
|
scopedSlots: { customRender: 'fixedLength' }
|
|
|
},
|
|
|
{
|
|
|
- title: '合金',
|
|
|
+ title: '宽/高',
|
|
|
align:"center",
|
|
|
- dataIndex: 'alloy',
|
|
|
+ dataIndex: 'widthHeight',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'alloy' }
|
|
|
+ scopedSlots: { customRender: 'widthHeight' }
|
|
|
},
|
|
|
{
|
|
|
- title: '标准',
|
|
|
+ title: '片数',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'pieces',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: { customRender: 'pieces' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '备注',
|
|
|
align:"center",
|
|
|
- dataIndex: 'standard',
|
|
|
+ dataIndex: 'remarks',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'standard' }
|
|
|
+ scopedSlots: { customRender: 'remarks' }
|
|
|
},
|
|
|
{
|
|
|
title: '米重',
|
|
@@ -412,11 +358,11 @@
|
|
|
scopedSlots: { customRender: 'exclusiveZone' }
|
|
|
},
|
|
|
{
|
|
|
- title: '宽度',
|
|
|
+ title: '宽度/长度',
|
|
|
align:"center",
|
|
|
- dataIndex: 'width',
|
|
|
+ dataIndex: 'widthLength',
|
|
|
ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'width' }
|
|
|
+ scopedSlots: { customRender: 'widthLength' }
|
|
|
},
|
|
|
{
|
|
|
title: '高度',
|
|
@@ -489,13 +435,7 @@
|
|
|
ellipsis: true,
|
|
|
scopedSlots: { customRender: 'cuttingRightTop' }
|
|
|
},
|
|
|
- {
|
|
|
- title: '备注',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'remarks',
|
|
|
- ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'remarks' }
|
|
|
- },
|
|
|
+
|
|
|
{
|
|
|
title: '系列',
|
|
|
align:"center",
|
|
@@ -510,19 +450,6 @@
|
|
|
ellipsis: true,
|
|
|
scopedSlots: { customRender: 'glassNumber' }
|
|
|
},
|
|
|
- {
|
|
|
- title: '换算率',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'rate',
|
|
|
- ellipsis: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '货位',
|
|
|
- align:"center",
|
|
|
- dataIndex: 'storageLocation',
|
|
|
- ellipsis: true,
|
|
|
- scopedSlots: { customRender: 'storageLocation' }
|
|
|
- },
|
|
|
],
|
|
|
}
|
|
|
},
|
|
@@ -548,74 +475,27 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- delecteCopyRow(){
|
|
|
- if( this.selectedRowKeys.length==0){
|
|
|
- this.$message.warning('请勾选子表数据!')
|
|
|
- }else{
|
|
|
- var delectAllow = 'yes'
|
|
|
- this.selectedRows.map(item=>{
|
|
|
- if(item.id){delectAllow = 'no'}
|
|
|
- })
|
|
|
- if(delectAllow=='no'){
|
|
|
- this.$emit('clearn')
|
|
|
- this.$message.warning('勾选数据中有不可删除数据!')
|
|
|
- }else{
|
|
|
- this.selectedRowKeys.map(event=>{
|
|
|
- this.dataSource = this.dataSource.filter( (x)=> {return x.rowNo !== event});
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- copyRow(){
|
|
|
- if(this.selectedRowKeys.length!==1){
|
|
|
- this.$emit('clearn')
|
|
|
- this.$message.warning('请勾选一条数据!')
|
|
|
- }else{
|
|
|
- var obj ={},
|
|
|
- num = 0
|
|
|
- this.dataSource.map((item,index)=>{
|
|
|
- if(item.id== this.selectedRows[0].id){
|
|
|
- item.copied = '1'
|
|
|
- obj = {...item}
|
|
|
- obj.projectCode = '6'
|
|
|
- obj.newRow = '1'
|
|
|
- obj.id = ''
|
|
|
- num = index+1
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- this.dataSource.splice(num, 0, obj);
|
|
|
- this.dataSource.map((item,index )=>{item.rowNo = index})
|
|
|
- this.selectedRows = []
|
|
|
- this.selectedRowKeys=[]
|
|
|
- }
|
|
|
- },
|
|
|
- changeOut(){
|
|
|
- if(this.allowEdit=='no'&&this.allowEditMaterial=='yes'){
|
|
|
- this.$emit('changeEdit')
|
|
|
- }
|
|
|
- },
|
|
|
addMaterial(){
|
|
|
this.dataSource.push({newRow:'1'})
|
|
|
},
|
|
|
changeQuantity(record){
|
|
|
- if(record.copied&&record.quantity&&record.quantityExecute&&(Number(record.quantity)<Number(record.quantityExecute))){
|
|
|
+ if(record.quantity&&record.quantityExecute&&(Number(record.quantity)<Number(record.quantityExecute))){
|
|
|
record.quantity = ''
|
|
|
this.$message.warning('主数量不可小于已执行主数量!')
|
|
|
}
|
|
|
},
|
|
|
changeUQuantity(record){
|
|
|
- if(record.copied&&record.unQuantity&&record.unQuantityExecute&&(Number(record.unQuantity)<Number(record.unQuantityExecute))){
|
|
|
+ if(rrecord.unQuantity&&record.unQuantityExecute&&(Number(record.unQuantity)<Number(record.unQuantityExecute))){
|
|
|
record.unQuantity = ''
|
|
|
this.$message.warning('辅数量不可小于已执行辅数量!')
|
|
|
}
|
|
|
},
|
|
|
onSearchInven(record){
|
|
|
- if(this.allowEdit=='no'&&!record.newRow){
|
|
|
- this.$message.warning('不可编辑!')
|
|
|
+ if(!this.planOrg||this.planOrg==''){
|
|
|
+ this.$message.warning('请选择生产组织!')
|
|
|
}else{
|
|
|
this.$refs.inventoryPopup.visible = true
|
|
|
- this.$refs.inventoryPopup.getData()
|
|
|
+ this.$refs.inventoryPopup.getData(this.planOrg)
|
|
|
this.$refs.inventoryPopup.record=record
|
|
|
}
|
|
|
},
|
|
@@ -625,6 +505,7 @@
|
|
|
this.$set(recoerd,'specs',data.SPECS)
|
|
|
this.$set(recoerd,'unit',data.unit)
|
|
|
this.$set(recoerd,'auxiliaryUnit',data.auxiliaryUnit )
|
|
|
+ this.$set(recoerd,'attribute',data.Code1 )
|
|
|
this.$set(recoerd,'inventory',data.ID )
|
|
|
},
|
|
|
},
|