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

@@ -24,7 +24,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx` export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx` export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
const service = axios.create({ const service = axios.create({
baseURL: `http://192.168.0.110:8005/submit/MESCommonBase.ashx`, baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间
}) })
export default service export default service

View File

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

View File

@@ -127,21 +127,21 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="150" fixed="right"> <el-table-column label="操作" align="center" width="150" fixed="right">
<template slot-scope="scope"> <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"> <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> </div>
</el-tooltip> </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"> <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)"/> <el-button :disabled="parseInt(scope.row.采购计划状态)===2" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
</div> </div>
</el-tooltip> </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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -156,7 +156,7 @@
@size-change="handleSizeChange2" @size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/> @current-change="handleCurrentChange2"/>
</div> </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"> <el-table-column label="物料编码" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料零件编码 }} {{ scope.row.物料零件编码 }}
@@ -199,7 +199,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="200px"> <el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope"> <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"> <div style="display: inline-block">
<el-button type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出采购计划</el-button> <el-button type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出采购计划</el-button>
</div> </div>

View File

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

View File

@@ -97,18 +97,19 @@
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
</el-table-column> </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"> <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"> <div style="display: inline-block">
<el-button <el-button
type="text" type="success"
size="mini" size="mini"
icon="el-icon-share" icon="el-icon-share"
plain
@click="aboutArrival(scope.row)">关联到货单</el-button> @click="aboutArrival(scope.row)">关联到货单</el-button>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" content="编辑" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">
<el-button <el-button
type="text" type="text"
@@ -118,7 +119,7 @@
@click="editTable1(scope.row)"/> @click="editTable1(scope.row)"/>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" content="删除" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">
<el-button <el-button
type="text" type="text"
@@ -227,7 +228,7 @@
@current-change="handleCurrentChange4"/> @current-change="handleCurrentChange4"/>
</div> </div>
<div slot="footer" class="dialog-footer"> <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> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -292,6 +293,7 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
this.searchTable1()
}, },
methods: { methods: {
fetchData() { fetchData() {