生产日报

master
zhaoxiaolin 1 year ago
parent 8524e051e9
commit 4ce59f6fc0

@ -67,3 +67,10 @@ export function getDailyReport(query) {
params: query
});
}
export function getWorkcenterList() {
return request({
url: '/mes/reportWork/getWorkcenterList',
method: 'get'
});
}

@ -12,11 +12,14 @@
</el-form-item>
<el-form-item label="工作中心">
<el-input
v-model="queryParams.workCenter"
placeholder="请输入工作中心"
clearable
/>
<el-select v-model="queryParams.workCenter" filterable placeholder="请选择工作中心">
<el-option
v-for="item in options"
:key="item.factoryCode"
:label="item.factoryName"
:value="item.factoryCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
@ -48,12 +51,12 @@
<el-table-column
prop="teamDesc"
label="组别"
width="100">
width="90">
</el-table-column>
<el-table-column
prop="prodType"
label="分类"
width="100">
width="80">
</el-table-column>
<el-table-column
prop="teamLeaderName"
@ -63,7 +66,7 @@
<el-table-column
prop="productCode"
label="产品编码"
width="100">
width="120">
</el-table-column>
<el-table-column
prop="spec"
@ -178,7 +181,7 @@
</template>
<script>
import { getDailyReport} from "@/api/mes/reportWork";
import { getDailyReport,getWorkcenterList} from "@/api/mes/reportWork";
import moment from 'moment';
export default {
name: "Prepare",
@ -213,11 +216,13 @@ export default {
//
form: {},
//
rules: {}
rules: {},
options: null
};
},
created() {
this.getList();
this.getWorkcenterList();
},
methods: {
indexMethod(index){
@ -229,10 +234,7 @@ export default {
this.$modal.msgSuccess("日期不能为空");
return
}
if(this.queryParams.workCenter == null){
this.$modal.msgSuccess("工作中心不能为空");
return
}
this.loading = true;
getDailyReport(this.queryParams).then(response => {
this.prepareList = response.rows;
@ -240,6 +242,13 @@ export default {
this.loading = false;
});
},
getWorkcenterList(){
getWorkcenterList().then(data => {
this.options = data;
});
this.queryParams.workCenter = this.options[0].factoryCode;
},
//
cancel() {
this.open = false;
@ -265,9 +274,9 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download('mes/reportWork/productionExport', {
this.download('mes/reportWork/getDailyReportExport', {
...this.queryParams
}, `prepare_${new Date().getTime()}.xlsx`)
}, `dailyReport${new Date().getTime()}.xlsx`)
},
getSummaries(param) {
const { columns, data } = param;
@ -288,7 +297,7 @@ export default {
}
}, 0);
sums[index] += '';
if(sums[index] > 1000000){
if(index<6){
sums[index] = '';
}
} else {

Loading…
Cancel
Save