This commit is contained in:
zhangdingyu
2019-10-10 11:29:51 +08:00
5 changed files with 34 additions and 33 deletions

View File

@@ -30,6 +30,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="small" icon="el-icon-upload2" style="margin-left: 10px" @click="opendialogVisibleMachine()">上传总图</el-button>
</div>
<upload-excel-component @on-selected-file="selected"/>
</div>

View File

@@ -127,21 +127,21 @@
</el-table-column>
<el-table-column label="操作" align="center" width="150" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="600" effect="dark" content="编辑" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===2" type="text" size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-printer" @click="exportExcel(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="600" effect="dark" content="删除" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===2" type="text" style="margin-left: 20px" size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===2" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="600" effect="dark" content="打印采购计划单" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" icon="el-icon-printer" style="margin-left: 20px" @click="exportExcel(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
@@ -156,7 +156,7 @@
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" height="500px" size="mini">
<el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" size="mini">
<el-table-column label="物料编码" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
@@ -199,7 +199,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope">
<el-tooltip effect="dark" content="物料移出采购计划" placement="top">
<el-tooltip :open-delay="1000" effect="dark" content="物料移出采购计划" placement="top">
<div style="display: inline-block">
<el-button type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出采购计划</el-button>
</div>

View File

@@ -41,11 +41,11 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
<el-table-column label="操作" align="center" width="250" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="添加到货明细" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" icon="el-icon-circle-plus-outline" @click="addArrivalOrderMX(scope.row)">添加到货明细</el-button>
<el-button type="success" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalOrderMX(scope.row)">添加到货明细</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
@@ -82,7 +82,6 @@
highlight-current-row
stripe
style="margin: 3px 0"
height="200px"
size="mini"
@row-click="searchTable6">
<el-table-column width="60" align="center" type="index" label="序号"/>
@@ -111,11 +110,11 @@
{{ scope.row.金额 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
<el-table-column label="操作" align="center" width="250" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="关联备料材料" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" icon="el-icon-circle-plus-outline" @click="addArrivalCL(scope.row)">关联备料材料</el-button>
<el-button type="warning" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalCL(scope.row)">关联备料材料</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
@@ -141,7 +140,6 @@
highlight-current-row
stripe
style="margin: 3px 0"
height="300px"
size="mini">
<el-table-column label="物料编码" align="center" width="200">
<template slot-scope="scope">
@@ -168,9 +166,9 @@
{{ scope.row.成品尺寸 }}
</template>
</el-table-column>
<el-table-column label="单件重量" align="center">
<el-table-column label="单件重量" align="center" width="150px">
<template slot-scope="scope">
<el-input v-model="scope.row.单件重量" size="mini" style="width:70px" @change="save(scope.$index, scope.row)"/>
<el-input-number v-model="scope.row.单件重量" step="1" size="mini" style="width:120px" @change="save(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="总重量" align="center" prop="总重量">
@@ -193,11 +191,11 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<el-table-column label="操作" align="center" width="110px" fixed="right">
<template slot-scope="scope">
<el-tooltip effect="dark" content="取消关联" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)"/>
<el-button type="primary" size="mini" plain @click="deleteMateriel(scope.row)">取消关联</el-button>
</div>
</el-tooltip>
</template>
@@ -540,9 +538,9 @@ export default {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Number(prev) + Number(curr)
return parseInt((Number(prev) + Number(curr)) * 100) / 100
} else {
return Number(prev)
return parseInt(Number(prev) * 100) / 100
}
}, 0)
sums[index]
@@ -558,9 +556,9 @@ export default {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Number(prev) + Number(curr)
return parseInt((Number(prev) + Number(curr)) * 100) / 100
} else {
return Number(prev)
return parseInt(Number(prev) * 100) / 100
}
}, 0)
sums[index] += ' 元'
@@ -581,8 +579,8 @@ export default {
})
},
save(index, row) {
this.allWeight = row.批次数量 * row.单件重量
this.ALLMoney = this.allWeight * this.单价
this.allWeight = parseInt(row.批次数量 * row.单件重量 * 100) / 100
this.ALLMoney = parseInt(this.allWeight * this.单价 * 100) / 100
saveWeight(row.采购计划明细流水号, row.单件重量, this.allWeight, this.ALLMoney).then(response => {
console.log(response)
if (response.data[0].result === '1') {

View File

@@ -97,18 +97,19 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<el-table-column align="center" label="操作" fixed="right" width="250px">
<template slot-scope="scope">
<el-tooltip effect="dark" content="关联到货单" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="关联到货单" placement="top">
<div style="display: inline-block">
<el-button
type="text"
type="success"
size="mini"
icon="el-icon-share"
plain
@click="aboutArrival(scope.row)">关联到货单</el-button>
</div>
</el-tooltip>
<el-tooltip effect="dark" content="编辑" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
type="text"
@@ -118,7 +119,7 @@
@click="editTable1(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip effect="dark" content="删除" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
type="text"
@@ -227,7 +228,7 @@
@current-change="handleCurrentChange4"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入到货单</el-button>
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">关联到货单</el-button>
</div>
</el-dialog>
</div>
@@ -292,6 +293,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {