离线采购冲突

This commit is contained in:
bryan sun
2019-10-23 19:20:27 +08:00
30 changed files with 1105 additions and 1327 deletions

View File

@@ -27,15 +27,12 @@
</el-col>
<el-col style="margin-left: 0px">
<span>零件图号:</span>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0"/>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0" @keyup.enter.native="searchTable1"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入外购备料</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top">
<el-button type="danger" size="small" icon="el-icon-download" style="margin-left: 10px" @click="back">打回重新分配</el-button>
<el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button>
</el-tooltip>
<el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="330" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
@@ -60,7 +57,7 @@
</template>
</el-table-column>
</el-table>
<div class="block">
<div v-show="false" class="block">
<el-pagination
:current-page="pageCurrent1"
:page-size="pageSize1"
@@ -78,11 +75,21 @@
<span>采购计划单号:</span>
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/>
<span style="margin-left: 10px">供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<el-select v-model="supplierName0" placeholder="供应商" size="small" filterable clearable>
<el-option
v-for="item in supplierName0s"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>-->
<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
</el-tooltip>
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购计划单</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入外购备料</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">
<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>
</el-tooltip>
@@ -126,21 +133,21 @@
{{ scope.row.计划完成日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150" fixed="right">
<el-table-column label="操作" align="center" width="350" 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-printer" @click="exportExcel(scope.row)"/>
<el-button size="mini" type="success" plain icon="el-icon-printer" @click="exportExcel(scope.row)">打印采购计划</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="text" style="margin-left: 20px" size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)"/>
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="primary" plain size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)">编辑</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="primary" plain size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)">删除</el-button>
</div>
</el-tooltip>
</template>
@@ -354,6 +361,7 @@ export default {
purchasingOrder: '', // 采购单号
purchasingOrderNumber: '', // 采购计划流水号
supplierName0: '', // 供应商名称(外面的)
supplierName0s: [], // 供应商名称(外面的)
supplierName: '', // 供应商名称
tableData2: [],
total2: 0,
@@ -435,6 +443,10 @@ export default {
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
this.supplierName0s.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
searchRawMaterial(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
@@ -509,8 +521,9 @@ export default {
searchTable1() { // 查询外购备料
this.loading1 = true
this.partDrawingNumber ? this.check1 = 1 : this.check1 = 0
searchPurchasedMaterials(this.pageCurrent1, this.pageSize1, this.check1, this.partDrawingNumber).then(response => {
this.tableData1 = response.data.rows
// this.pageCurrent1, this.pageSize1,
searchPurchasedMaterials(this.check1, this.partDrawingNumber).then(response => {
this.tableData1 = response.data
this.total1 = response.data.total
this.loading1 = false
})
@@ -533,7 +546,7 @@ export default {
searchTable2() { // 查询采购单列表
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0).then(response => {
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, 0, 0, this.check4, this.supplierName0).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})