Merge remote-tracking branch 'origin/master'

master
suixy 2 months ago
commit bfbec6cd2e

@ -50,21 +50,18 @@
size="mini"
type="primary"
@click="handleStart(scope.row)"
v-hasPermi="['base:orderInfo:start']"
>开始生产</el-button>
<el-button
v-if="scope.row.executionStatus === 'RUNNING'"
size="mini"
type="warning"
@click="handleUpdateQty(scope.row)"
v-hasPermi="['base:orderInfo:updateQty']"
>更新数量</el-button>
<el-button
v-if="scope.row.executionStatus === 'RUNNING'"
size="mini"
type="success"
@click="handleComplete(scope.row)"
v-hasPermi="['base:orderInfo:complete']"
>完工提报</el-button>
<el-button
size="mini"
@ -219,11 +216,22 @@ export default {
methods: {
getList() {
this.loading = true;
listOrderInfo(this.queryParams).then(response => {
this.orderList = response.rows;
this.total = response.total;
this.loading = false;
}).catch(() => {
listOrderInfo(this.queryParams)
.then(response => {
const data = response && response.data ? response.data : response;
if (Array.isArray(data)) {
this.orderList = data;
this.total = data.length;
} else {
this.orderList = (data && data.rows) ? data.rows : [];
this.total = (data && data.total) ? data.total : this.orderList.length;
}
})
.catch(() => {
this.orderList = [];
this.total = 0;
})
.finally(() => {
this.loading = false;
});
},

@ -382,8 +382,8 @@ import {
updateOrderInfo,
releaseOrderPlan, replaceProductionLine
} from '@/api/base/orderInfo'
import { findProductLineList } from '@//api/base/productLine'
import { addSAPCalendar } from '@//api/production/calendarInfo'
import { findProductLineList } from '@/api/base/productLine'
import { addSAPCalendar } from '@/api/production/calendarInfo'
export default {
name: 'OrderInfo',
@ -482,9 +482,22 @@ export default {
this.queryParams.params['beginEndTime'] = this.daterangeEndTime[0]
this.queryParams.params['endEndTime'] = this.daterangeEndTime[1]
}
listOrderInfo(this.queryParams).then(response => {
this.orderInfoList = response.rows
this.total = response.total
listOrderInfo(this.queryParams)
.then(response => {
const data = response && response.data ? response.data : response
if (Array.isArray(data)) {
this.orderInfoList = data
this.total = data.length
} else {
this.orderInfoList = (data && data.rows) ? data.rows : []
this.total = (data && data.total) ? data.total : this.orderInfoList.length
}
})
.catch(() => {
this.orderInfoList = []
this.total = 0
})
.finally(() => {
this.loading = false
})
findProductLineList({ productLineType: 1 }).then(response => {

Loading…
Cancel
Save