成品发货

This commit is contained in:
2023-11-03 16:59:07 +08:00
parent 013c08710c
commit 046a5eea32
20 changed files with 2253 additions and 109 deletions

View File

@@ -50,28 +50,16 @@
:before-close="addWorkOrderCancel"
width='70%'
>
<add-work-order ref="addWorkOrder" @successSubmit="addWorkOrderSubmit" />
<add-work-order ref="addWorkOrder" @addWorkOrderSubmit="addWorkOrderSubmit" />
</base-dialog>
<!-- 绑定工单 -->
<!-- <base-dialog
dialogTitle="绑定工单"
:dialogVisible="bindWorkOrdervisible"
@cancel="bindWorkOrderCancel"
@confirm="bindWorkOrderConfirm"
:before-close="bindWorkOrderCancel"
width='70%'
>
<bind-work-order ref="bindWorkOrder" @successSubmit="bindWorkOrderSubmit" />
</base-dialog> -->
</div>
</template>
<script>
import { parseTime } from '@/utils/ruoyi'
import { getOrderPage, orderDelete } from '@/api/base/orderManage'
import { getOrderPage, orderDelete, customerList } from '@/api/base/orderManage'
import OrderAdd from './components/orderAdd'
import AddWorkOrder from './components/addWorkOrder'
import BindWorkOrder from './components/bindWorkOrder'
import { publicFormatter } from '@/utils/dict';
import { publicFormatter } from '@/utils/dict'
const tableProps = [
{
prop: 'createTime',
@@ -81,7 +69,9 @@ const tableProps = [
},
{
prop: 'name',
label: '订单名称'
label: '订单名称',
minWidth: 120,
showOverflowtooltip: true
},
{
prop: 'code',
@@ -90,7 +80,8 @@ const tableProps = [
},
{
prop: 'customerId',
label: '客户(?)'
label: '客户',
showOverflowtooltip: true
},
{
prop: 'triggerOrigin',
@@ -109,19 +100,22 @@ const tableProps = [
},
{
prop: 'planQuantity',
label: '计划加工量'
label: '计划加工量',
width: 90
},
{
prop: 'actualQuantity',
label: '实际加工量'
label: '实际加工量',
width: 90
},
{
prop: 'planProductId',
label: '产品(?)'
prop: 'productName',
label: '产品',
showOverflowtooltip: true
},
{
prop: 'unit',
label: '单位(?)'
label: '单位'
},
{
prop: 'price',
@@ -229,26 +223,39 @@ export default {
centervisible: false,
priorityList: this.getDictDatas(this.DICT_TYPE.ORDER_PRIORITY),
workIssueTitle: '',
addWorkOrdervisible: false
// bindWorkOrdervisible: false
addWorkOrdervisible: false,
orderDetailVisible: false
}
},
components: { OrderAdd, AddWorkOrder, BindWorkOrder },
components: { OrderAdd, AddWorkOrder },
created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getSelectList()
this.getList();
this.getList()
},
methods: {
getSelectList() {
console.log(this.getDictDatas(this.DICT_TYPE.ORDER_PRIORITY))
},
getList() {
getOrderPage({...this.queryParams}).then(res => {
this.list = res.data.records || []
let arr = res.data.records || []
this.total = res.data.total || 0
if (arr.length > 0) {
customerList().then(result => {
let tempData = result.data || []
if (tempData.length > 0) {
arr.map(item => {
for (let i of tempData) {
if (item.customerId === i.id) {
item.customerId = i.name
}
}
})
this.list = arr
}
})
}else {
this.list = arr
}
})
},
buttonClick(val) {
@@ -256,7 +263,7 @@ export default {
if (val.btnName === 'search') {
this.queryParams.name = val.name
this.queryParams.status = val.status
if (val.timeVal.length > 0) {
if (val.timeVal && val.timeVal.length > 0) {
this.queryParams.lastIssuedTime[0] = val.timeVal[0] + ' 00:00:00'
this.queryParams.lastIssuedTime[1] = val.timeVal[1] + ' 23:59:59'
} else {
@@ -285,6 +292,7 @@ export default {
this.handleDelete(val.data)
break
case 'detail':
this.$router.push({ name: 'OrderDetailData', params: { orderId: val.data.id }})
break
case 'add':
this.workIssueTitle = '新增工单'