8 changed files with 391 additions and 133 deletions
-
4config/index.js
-
2src/api/production.js
-
98src/views/modules/board/nextWeekShipmentBoard.vue
-
102src/views/modules/board/productionBlankingBoard.vue
-
94src/views/modules/board/thisWeekShipmentBoard.vue
-
19src/views/modules/production/dailyPlan.vue
-
203src/views/modules/production/productionBlankingSearch.vue
-
2static/config/index.js
@ -0,0 +1,203 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -20px;"> |
||||
|
<el-form-item :label="'硫化订单号:'"> |
||||
|
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'硫化产品名称:'"> |
||||
|
<el-input v-model="searchData.partDescSpec" style="width: 120px"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-button @click="search()" style="margin-left: 0px;margin-top: 33px" type="primary">查询</el-button> |
||||
|
<el-button @click="getSum()" style="margin-left: 0px;margin-top: 33px" type="primary">计算选中订单合计</el-button> |
||||
|
</el-form> |
||||
|
<div class="search1"> |
||||
|
<el-table |
||||
|
cell-style="cc" |
||||
|
:height="height" |
||||
|
:data="tableData" |
||||
|
ref="wt_table" |
||||
|
@selection-change="selectionChangeHandle" |
||||
|
border |
||||
|
:row-class-name="tableRowClassName" |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column |
||||
|
type="selection" |
||||
|
align="center" |
||||
|
width="30"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="orderNo" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="65" |
||||
|
label="硫化订单号"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="partDescSpec" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="120" |
||||
|
label="硫化产品名称"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="compPartDescSpec" |
||||
|
header-align="center" |
||||
|
align="left" |
||||
|
min-width="120" |
||||
|
label="混炼胶名称"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="qtyRequired" |
||||
|
header-align="center" |
||||
|
align="right" |
||||
|
min-width="45" |
||||
|
label="混炼胶用量"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="sjph1" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
min-width="50" |
||||
|
label="生胶牌号1"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="sjphQtyReq1" |
||||
|
header-align="center" |
||||
|
align="right" |
||||
|
min-width="45" |
||||
|
label="生胶1用量"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="sjph2" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
min-width="50" |
||||
|
label="生胶牌号2"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="sjphQtyReq2" |
||||
|
header-align="center" |
||||
|
align="right" |
||||
|
min-width="45" |
||||
|
label="生胶2用量"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="planStartDate" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
min-width="45" |
||||
|
label="需求日期"> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<el-dialog title="合计" :close-on-click-modal="false" v-drag :visible.sync="sumFlag" width="341px"> |
||||
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
||||
|
<el-form-item :label="'混炼胶用量:'"> |
||||
|
<el-input v-model="qty1" readonly style="width: 130px"></el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item :label="'生胶1用量:'"> |
||||
|
<el-input v-model="qty2" readonly style="width: 130px" ></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item :label="'生胶2用量:'"> |
||||
|
<el-input v-model="qty3" readonly style="width: 130px" ></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
||||
|
<el-button type="primary" @click="sumFlag = false">关闭</el-button> |
||||
|
</el-footer> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
productionBlankingSearch, |
||||
|
} from '@/api/production.js' |
||||
|
export default { |
||||
|
name: 'productionBlankingSearch', |
||||
|
data () { |
||||
|
return { |
||||
|
sumFlag:false, |
||||
|
pageIndex: 1, |
||||
|
totalPage: 1, |
||||
|
height: 200, |
||||
|
tableData: [], |
||||
|
searchData:{ |
||||
|
orderNo:'', |
||||
|
partDescSpec:'' |
||||
|
}, |
||||
|
dataListSelections: [], |
||||
|
qty1:0, |
||||
|
qty2:0, |
||||
|
qty3:0, |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.$nextTick(() => { |
||||
|
this.height = window.innerHeight - 210 |
||||
|
}) |
||||
|
// this.autoRoll() |
||||
|
}, |
||||
|
methods: { |
||||
|
// 多选数据 |
||||
|
selectionChangeHandle (val) { |
||||
|
this.dataListSelections = val |
||||
|
}, |
||||
|
tableRowClassName ({row, rowIndex}) { |
||||
|
if (row.finishedFlag == '2') { |
||||
|
return 'success-row' |
||||
|
} |
||||
|
if (row.finishedFlag == '3') { |
||||
|
return 'false-row' |
||||
|
} |
||||
|
return '' |
||||
|
}, |
||||
|
search () { |
||||
|
productionBlankingSearch(this.searchData).then(({data}) => { |
||||
|
this.tableData = data.rows; |
||||
|
}) |
||||
|
}, |
||||
|
getSum(){ |
||||
|
this.qty1=0; |
||||
|
this.qty2=0; |
||||
|
this.qty3=0; |
||||
|
if(this.dataListSelections.length==0){ |
||||
|
this.$alert('未勾选订单!', '错误', { |
||||
|
confirmButtonText: '确定' |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
let dataList=this.dataListSelections; |
||||
|
for (let i = 0; i <dataList.length ; i++) { |
||||
|
if(dataList[i].qtyRequired!=null){ |
||||
|
let num1=this.qty1+dataList[i].qtyRequired; |
||||
|
this.qty1=num1; |
||||
|
} |
||||
|
if(dataList[i].sjphQtyReq1!=null){ |
||||
|
let num2=this.qty2+dataList[i].sjphQtyReq1; |
||||
|
this.qty2=num2; |
||||
|
} |
||||
|
if(dataList[i].sjphQtyReq2!=null){ |
||||
|
let num3=this.qty3+dataList[i].sjphQtyReq2; |
||||
|
this.qty3=num3; |
||||
|
} |
||||
|
} |
||||
|
this.qty1=Number(this.qty1).toFixed(2); |
||||
|
this.qty2=Number(this.qty2).toFixed(2); |
||||
|
this.qty3=Number(this.qty3).toFixed(2); |
||||
|
this.sumFlag=true; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style > |
||||
|
.search1 .el-table .success-row { |
||||
|
background: #1bb61b; |
||||
|
} |
||||
|
.search1 .el-table .false-row { |
||||
|
/*background: #cbcb14;*/ |
||||
|
background: #db1212; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue