Compare commits

..

No commits in common. "b185d3ebf7aeb15306f04baffd0b29adcd00bf08" and "e64e33a20337ff2bd5c4fe7aa33429d9a5cb180c" have entirely different histories.

11 changed files with 172 additions and 450 deletions

View File

@ -71,21 +71,3 @@ export function deliveryLogDetCreate(data) {
data: data
})
}
// 获得一条发货详细
export function deliveryLogDetGet(query) {
return request({
url: '/extend/delivery-log-det/get',
method: 'get',
params: query
})
}
// 编辑发货详情
export function deliveryLogDetUpdate(data) {
return request({
url: '/extend/delivery-log-det/update',
method: 'put',
data: data
})
}

View File

@ -137,13 +137,4 @@ export function bomUseNum(query) {
method: 'get',
params: query
})
}
// 完成订单
export function orderFinish(query) {
return request({
url: '/base/order/finish',
method: 'post',
params: query
})
}

View File

@ -1,69 +1,46 @@
<template>
<div>
<el-drawer
title="发货清单详情"
size="60%"
:append-to-body="true"
:visible.sync="centervisible"
@close='close'>
<div class="box1">
<el-row>
<el-col :span='12'>
<span class="title">订单名</span>
<span class="text">{{orderName ? orderName : '-'}}</span>
</el-col>
<el-col :span='12'>
<span class="title">发货单号</span>
<span class="text">{{code ? code : '-'}}</span>
</el-col>
</el-row>
<el-drawer
title="发货清单详情"
size="60%"
:append-to-body="true"
:visible.sync="centervisible"
@close='close'>
<div class="box1">
<el-row>
<el-col :span='12'>
<span class="title">订单名</span>
<span class="text">{{orderName ? orderName : '-'}}</span>
</el-col>
<el-col :span='12'>
<span class="title">发货单号</span>
<span class="text">{{code ? code : '-'}}</span>
</el-col>
</el-row>
</div>
<div class="box2">
<div class="boxTitle">
<span class="blueTitle"></span>
<span>详情</span>
</div>
<div class="box2">
<div class="boxTitle">
<span class="blueTitle"></span>
<span>详情</span>
</div>
<base-table
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
>
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
label="操作"
:method-list="tableBtn"
@clickBtn="editDetDetail"
/>
</base-table>
<pagination
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
</div>
</el-drawer>
<!-- 编辑详情 -->
<base-dialog
dialogTitle="编辑"
:dialogVisible="detailEditVisible"
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width="50%"
>
<edit-detail ref="editDetail" @successSubmit="successSubmit" />
</base-dialog>
</div>
<base-table
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
/>
<pagination
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
</div>
</el-drawer>
</template>
<script>
import { parseTime } from '@/utils/ruoyi'
import { deliveryLogDetPage } from '@/api/base/delivery'
import EditDetail from './editDetail.vue'
const tableProps = [
{
prop: 'createTime',
@ -74,7 +51,6 @@ const tableProps = [
{
prop: 'deliveryCarCode',
label: '装车单号',
minWidth: 100,
showOverflowtooltip: true
},
{
@ -120,21 +96,11 @@ export default {
total: 0,
tableProps,
tableData: [],
tableBtn: [
this.$auth.hasPermi('extend:delivery-log:update')
? {
type: 'edit',
btnName: '编辑'
}
: undefined
].filter((v) => v),
tableH: this.tableHeight(275),
orderName: '',
code: '',
detailEditVisible: false
code: ''
}
},
components: { EditDetail },
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(275)
@ -162,23 +128,6 @@ export default {
this.queryParams.logId = ''
this.tableData = []
this.total = 0
},
editDetDetail(val) {
this.detailEditVisible = true
this.$nextTick(() => {
this.$refs.editDetail.init(val.data.id)
})
},
handleCancel() {
this.$refs.editDetail.formClear()
this.detailEditVisible = false
},
handleConfirm() {
this.$refs.editDetail.submitForm()
},
successSubmit() {
this.handleCancel()
this.getList()
}
}
}

View File

@ -1,124 +0,0 @@
<template>
<el-form ref="addOrUpdate" :rules="rules" label-width="130px" :model="form">
<el-row>
<el-col :span='12'>
<el-form-item label="装车单号" prop="deliveryCarCode">
<el-input v-model="form.deliveryCarCode"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="装车时间" prop="loadTime">
<el-date-picker
v-model="form.loadTime"
type="datetime"
format='yyyy-MM-dd HH:mm:ss'
value-format="timestamp"
style="width: 100%;"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="装车产品" prop="productId">
<el-select v-model="form.productId" disabled placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in productList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="装箱规格(片/箱)" prop="packagingSize">
<el-input-number v-model="form.packagingSize" :min="0" :max='9999999999' style="width:100%"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="产品批次" prop="productDate">
<el-input v-model="form.productDate" placeholder="多个批次用','隔开"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="箱/托数" prop="packagingNum">
<el-input-number v-model="form.packagingNum" :min="0" :max='9999999999' style="width:100%"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="装车总量" prop="quantity">
<el-input-number v-model="form.quantity" :min="0" :max='9999999999' style="width:100%"></el-input-number>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import { getProductAll } from '@/api/base/product'
import { deliveryLogDetGet, deliveryLogDetUpdate } from '@/api/base/delivery'
export default {
name: 'editDetail',
data() {
return {
form: {
logId: '',
deliveryCarCode: '',
loadTime: null,
productId: '',
packagingSize: null,
productDate: '',
packagingNum: null,
quantity: null
},
rules: {
deliveryCarCode: [{ required: true, message: "装车单号不能为空", trigger: "blur" }],
productId: [{ required: true, message: "装车产品不能为空", trigger: "change" }],
packagingSize: [{ required: true, message: "装箱规格不能为空", trigger: "blur" }],
packagingNum: [{ required: true, message: "箱/托数不能为空", trigger: "blur" }],
quantity: [{ required: true, message: "装车总量不能为空", trigger: "blur" }]
},
productList: []
}
},
mounted() {
this.getSelectList()
},
methods: {
init(id) {
deliveryLogDetGet({id}).then(res => {
console.log(res)
this.form = res.data
})
},
getSelectList() {
getProductAll().then(res => {
this.productList = res.data || []
})
},
submitForm() {
this.$refs['addOrUpdate'].validate((valid) => {
if (valid) {
console.log(this.form)
deliveryLogDetUpdate({ ...this.form }).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit')
}
})
} else {
return false
}
})
},
formClear() {
this.$refs.addOrUpdate.resetFields()
}
}
}
</script>

View File

@ -302,7 +302,7 @@ export default {
successSubmit2() {
this.handleCancel2()
this.getList()
}
},
}
}
</script>

View File

@ -19,11 +19,11 @@
<div class="lightTip">{{orderMsg.num ? orderMsg.num : '-'}}</div>
</div>
<div class="box_col">
<div class="blodTip">占比(%)</div>
<div class="blodTip">占比(%)</div>
<div class="lightTip">{{orderMsg.rate ? orderMsg.rate : '-'}}</div>
</div>
<div class="box_col">
<div class="blodTip">运输费用</div>
<div class="blodTip">运输费用</div>
<div class="lightTip">{{orderMsg.cost ? orderMsg.cost : '-'}}</div>
</div>
</div>
@ -305,11 +305,8 @@ export default {
}
},
legend: {
type: 'scroll',
orient: 'vertical',
right: '10%',
top: 20,
bottom: 20,
bottom: '5%',
left: 'center',
icon: 'rect',
itemHeight: 8,
itemWidth: 8

View File

@ -61,7 +61,7 @@ const tableProps = [
},
{
prop: 'rate',
label: '累发货比例(%)'
label: '累发货比例(%)'
}
]
export default {

View File

@ -25,18 +25,23 @@
<el-row>
<el-col :span='12'>
<el-form-item label="产品名称" prop="planProductId">
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
<el-select v-model="form.planProductId" placeholder="请选择" :disabled="isBind" style="width: 100%;" @change="selectProduct">
<el-option
v-for="item in productList"
:key="item.id"
:label="item.name+' | '+item.specifications"
:label="item.name"
:value="item.id">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="产品规格" prop="productSpec">
<el-input v-model="form.productSpec" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="计划开始时间">
<el-date-picker
@ -49,8 +54,6 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="计划完成时间">
<el-date-picker
@ -63,21 +66,23 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="计划投入数量" prop="planAssignQuantity">
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="计划生产数量" prop="planQuantity">
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="关联工艺" prop="processFlowId">
<el-select v-model="form.processFlowId" placeholder="请选择" disabled style="width: 100%;">
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
<el-option
v-for="item in processFlowList"
:key="item.id"
@ -87,16 +92,16 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="物料计算方式" prop="materialMethod">
<el-radio-group v-model="form.materialMethod" disabled>
<el-radio-group v-model="form.materialMethod" :disabled="isBind">
<el-radio :label="1">产品基础</el-radio>
<el-radio :label="2">工艺扩展</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="优先级" prop="priority">
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
@ -109,8 +114,6 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="工单类型" prop="type">
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
@ -123,6 +126,8 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="关联产线" prop="productLineId">
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
@ -135,8 +140,6 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="负责人" prop="workers">
<el-input v-model="form.workers" :disabled="isBind"></el-input>
@ -167,6 +170,7 @@ export default {
name: '',
code: '',
planProductId: '',
productSpec: '',
planStartTime: '',
planFinishTime: '',
planAssignQuantity: 0,
@ -201,17 +205,14 @@ export default {
}
},
methods: {
init(data, param) {
this.form.orderId = data.id
init(id, param) {
this.form.orderId = id
this.getList()
if (param === 'add') {
this.isBind = false
getWorkOrderCode().then(res => {
this.form.code = res.data || ''
})
this.form.planProductId = data.planProductId
this.form.processFlowId = data.processFlowId
this.form.materialMethod = data.materialMethod
}else{//
this.isBind = true
}
@ -236,6 +237,18 @@ export default {
this.workOrderList = res.data || []
})
},
//
selectProduct(val) {
if (val) {
this.productList.map(item => {
if (val === item.id) {
this.form.productSpec = item.specifications
}
})
} else {
this.form.productSpec = ''
}
},
addWorkOrderSubmit() {
this.$refs['addWorkOrder'].validate((valid) => {
if (valid) {
@ -285,6 +298,8 @@ export default {
if (res.code === 0) {
this.form.code = res.data.code
this.form.planProductId = res.data.planProductId
this.selectProduct(this.form.planProductId)
this.form.productSpec = res.data.productSpec
this.planStartTime = res.data.planStartTime ? moment.unix(res.data.planStartTime).format('YYYY-MM-DD HH:mm:ss') : null
this.planFinishTime = res.data.planFinishTime ? moment.unix(res.data.planFinishTime).format('YYYY-MM-DD HH:mm:ss') : null
this.form.planAssignQuantity = res.data.planAssignQuantity

View File

@ -8,7 +8,7 @@
</el-col>
<el-col :span='12'>
<el-form-item label="订单号" prop="code">
<el-input v-model="form.code"></el-input>
<el-input v-model="form.code" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
@ -20,14 +20,12 @@
</el-col>
<el-col :span='12'>
<el-form-item label="产品名称" prop="planProductId">
<el-select v-model="form.planProductId" placeholder="请选择" style="width: 100%;">
<el-select v-model="form.planProductId" placeholder="请选择" style="width: 100%;" @change="selectProduct">
<el-option
v-for="item in productList"
:key="item.id"
:label="item.name+' | '+item.specifications"
:label="item.name"
:value="item.id">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
</el-option>
</el-select>
</el-form-item>
@ -39,6 +37,13 @@
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;"></el-input-number>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="产品规格" prop="productSpec">
<el-input v-model="form.productSpec" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="客户" prop="customerId">
<el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;">
@ -51,8 +56,6 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="优先级" prop="priority">
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;">
@ -65,6 +68,8 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="包装规格" prop="packSpec">
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;">
@ -77,13 +82,13 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="负责人" prop="workers">
<el-input v-model="form.workers"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="关联工艺" prop="processFlowId">
<el-select v-model="form.processFlowId" placeholder="请选择" style="width: 100%;">
@ -96,8 +101,6 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="物料计算方式" prop="materialMethod">
<el-radio-group v-model="form.materialMethod">
@ -106,33 +109,35 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="订单计划开始时间" prop="planStartTime">
<el-form-item label="订单计划开始时间">
<el-date-picker
v-model="form.planStartTime"
type="datetime"
v-model="planStartTime"
type="date"
format='yyyy-MM-dd'
value-format="yyyy-MM-dd"
style="width: 100%;"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-form-item label="订单计划完成时间">
<el-date-picker
v-model="planFinishTime"
type="date"
format='yyyy-MM-dd'
value-format="yyyy-MM-dd"
style="width: 100%;"
value-format="timestamp"
@change="timeChange"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span='12'>
<el-form-item label="订单计划完成时间" prop="planFinishTime">
<el-date-picker
v-model="form.planFinishTime"
type="datetime"
style="width: 100%;"
value-format="timestamp"
@change="timeChange"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span='12'>
<el-col :span='24'>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input>
</el-form-item>
@ -163,6 +168,7 @@ export default {
planQuantity: '',
planProductId: '',
price: '',
productSpec: '',
customerId: '',
priority: '',
packSpec: '',
@ -174,6 +180,8 @@ export default {
planStartTime: '',
planFinishTime: ''
},
planStartTime: '',
planFinishTime: '',
rules: {
name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }],
@ -197,15 +205,16 @@ export default {
this.form.code = res.data.code
this.form.planQuantity = res.data.planQuantity
this.form.planProductId = res.data.planProductId
this.selectProduct(this.form.planProductId)
this.form.price = res.data.price
this.form.customerId = res.data.customerId
this.form.priority = res.data.priority ? res.data.priority + '' : ''
this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
this.planStartTime = res.data.planStartTime ? moment(res.data.planStartTime).format('YYYY-MM-DD') : null
this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
this.form.workers = res.data.workers
this.form.processFlowId = res.data.processFlowId
this.form.materialMethod = res.data.materialMethod
this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null
this.planFinishTime = res.data.planFinishTime ? moment(res.data.planFinishTime).format('YYYY-MM-DD') : null
this.form.remark = res.data.remark
this.form.description = res.data.description
}
@ -233,23 +242,24 @@ export default {
this.processFlowList = res.data || []
})
},
timeChange() {
if (this.form.planStartTime && this.form.planFinishTime) {
if (this.form.planStartTime > this.form.planFinishTime) {
this.$modal.msgError('计划开始时间不能大于结束时间')
}
//
selectProduct(val) {
if (val) {
this.productList.map(item => {
if (val === item.id) {
this.form.productSpec = item.specifications
}
})
} else {
this.form.productSpec = ''
}
},
submitForm() {
this.$refs['orderAddForm'].validate((valid) => {
if (valid) {
if (this.form.planStartTime && this.form.planFinishTime) {
if (this.form.planStartTime > this.form.planFinishTime) {
this.$modal.msgError('计划开始时间不能大于结束时间')
return false
}
}
// console.log(this.form)
this.form.planStartTime = this.planStartTime ? new Date(this.planStartTime).valueOf() : ''
this.form.planFinishTime = this.planFinishTime ? new Date(this.planFinishTime).valueOf() : ''
console.log(this.form)
if (this.isEdit) {
//
orderUpdate({ ...this.form }).then((res) => {
@ -278,6 +288,10 @@ export default {
this.form.materialMethod = 1
this.form.price = 0.00
this.form.planQuantity = 0
this.planFinishTime = ''
this.planStartTime = ''
this.form.planFinishTime = ''
this.form.planStartTime = ''
this.isEdit = false
}
}

View File

@ -17,7 +17,7 @@
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="320"
:width="250"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick"
@ -56,7 +56,7 @@
</template>
<script>
import { parseTime } from '@/utils/ruoyi'
import { getOrderPage, orderDelete, customerList, orderFinish } from '@/api/base/orderManage'
import { getOrderPage, orderDelete, customerList } from '@/api/base/orderManage'
import OrderAdd from './components/orderAdd'
import AddWorkOrder from './components/addWorkOrder'
import { publicFormatter } from '@/utils/dict'
@ -115,8 +115,7 @@ const tableProps = [
},
{
prop: 'unit',
label: '单位',
filter: publicFormatter('unit_dict')
label: '单位'
},
{
prop: 'price',
@ -192,49 +191,13 @@ export default {
this.$auth.hasPermi('base:order-manage:addWorkOrder')
? {
type: 'add',
btnName: '新增工单',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 1
}
]
}
btnName: '新增工单'
}
: undefined,
this.$auth.hasPermi('base:order-manage:bindWorkOrder')
? {
type: 'bind',
btnName: '绑定工单',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 1
}
]
}
}
: undefined,
this.$auth.hasPermi('base:order-manage:bindWorkOrder')
? {
type: 'complete',
btnName: '完成工单',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'status',
value: 2
}
]
}
btnName: '绑定工单'
}
: undefined,
this.$auth.hasPermi('base:order-manage:detail')
@ -246,43 +209,13 @@ export default {
this.$auth.hasPermi('base:order-manage:edit')
? {
type: 'edit',
btnName: '编辑',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'triggerOrigin',
value: 1
},
{
type: 'equal',
name: 'status',
value: 1
}
]
}
btnName: '编辑'
}
: undefined,
this.$auth.hasPermi('base:order-manage:delete')
? {
type: 'delete',
btnName: '删除',
showParam: {
type: '&',
data: [
{
type: 'equal',
name: 'triggerOrigin',
value: 1
},
{
type: 'equal',
name: 'status',
value: 1
}
]
}
btnName: '删除'
}
: undefined
].filter((v) => v),
@ -365,7 +298,7 @@ export default {
this.workIssueTitle = '新增工单'
this.addWorkOrdervisible = true
this.$nextTick(() => {
this.$refs.addWorkOrder.init(val.data, 'add')
this.$refs.addWorkOrder.init(val.data.id, 'add')
})
break
case 'bind':
@ -375,9 +308,6 @@ export default {
this.$refs.addWorkOrder.init(val.data.id, 'bind')
})
break
case 'complete':
this.handleComplete(val.data)
break
default:
}
},
@ -390,15 +320,6 @@ export default {
this.$modal.msgSuccess("操作成功");
}).catch(() => {});
},
//
handleComplete(val) {
this.$modal.confirm('是否确认完成订单"' + val.name + '"?').then(function() {
return orderFinish({ id: val.id })
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {});
},
//
handleCancel() {
this.$refs.orderAdd.formClear()

View File

@ -3,94 +3,86 @@
<div class="box1">
<div class="boxTitle">
<span class="blueTitle"></span>
<span>订单编码: {{orderMsg.code}}</span>
<span>订单编码: 432784632747238</span>
</div>
<div style="padding-left: 14px;">
<el-row>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">订单名</div>
<div class="lightTip">{{orderMsg.name}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">产品信息</div>
<div class="lightTip">{{orderMsg.productName}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">产品规格</div>
<div class="lightTip">{{orderMsg.specifications}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">客户</div>
<div class="lightTip">{{orderMsg.customerName}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">包装规格</div>
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec)}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">物料计算方式</div>
<div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}}</div>
</el-col>
<el-col :span='3'>
</el-row>
<el-row>
<el-col :span='4'>
<div class="blodTip">创建时间</div>
<div class="lightTip">{{ parseTime(orderMsg.createTime) }}</div>
<div class="lightTip">{{ parseTime(orderMsg.triggerTime) }}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">计划开始时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
</el-col>
</el-row>
<el-row>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">计划完成时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planFinishTime) }}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">计划加工数量</div>
<div class="lightTip">{{orderMsg.planQuantity}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">加工平方数(平方米)</div>
<div class="lightTip">{{orderMsg.planArea}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">预计用时()</div>
<div class="lightTip">{{ orderMsg.expectTime }}</div>
</el-col>
<el-col :span='3'>
</el-row>
<el-row>
<el-col :span='4'>
<div class="blodTip">状态</div>
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status)}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">实际开始时间</div>
<div class="lightTip">{{ parseTime(orderMsg.startProduceTime) }}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">实际完成时间</div>
<div class="lightTip">{{ parseTime(orderMsg.finishProduceTime) }}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">实际生产数量</div>
<div class="lightTip">{{orderMsg.actualQuantity }}</div>
</el-col>
</el-row>
<el-row>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">完成比%</div>
<div class="lightTip">{{orderMsg.completeProp}}</div>
</el-col>
<el-col :span='3'>
<el-col :span='4'>
<div class="blodTip">废片数量</div>
<div class="lightTip">{{orderMsg.nokQuantity}}</div>
</el-col>
<el-col :span='3'>
<div class="blodTip">负责人</div>
<div class="lightTip">{{orderMsg.workers}}</div>
</el-col>
<el-col :span='3'>
<div class="blodTip">关联工艺</div>
<div class="lightTip">{{processFlowName}}</div>
</el-col>
</el-row>
</div>
</div>
@ -126,8 +118,7 @@
</template>
<script>
import { parseTime } from '@/utils/ruoyi'
import { publicFormatter } from '@/utils/dict'
import { getProcessFlowList } from '@/api/base/orderManage'
import { publicFormatter } from '@/utils/dict';
const tableProps1 = [
{
prop: 'issueTime',
@ -181,7 +172,7 @@ const tableProps1 = [
{
prop: 'productLineNames',
label: '关联产线',
filter: (val) => val ? val.join(',') : '',
filter: (val) => val.join(','),
showOverflowtooltip: true
},
{
@ -224,8 +215,7 @@ export default {
pageNo: 1,
pageSize: 500
},
orderMsg: {},
processFlowName: ''
orderMsg: {}
}
},
mounted() {
@ -266,17 +256,6 @@ export default {
this.list2 = []
}
})
//
getProcessFlowList().then(res => {
let arr = res.data || []
if (arr.length > 0) {
arr.map(item => {
if (item.id === this.orderMsg.processFlowId) {
this.processFlowName = item.name
}
})
}
})
})
}
}
@ -299,14 +278,12 @@ export default {
padding: 16px 16px 0 16px;
.blodTip {
height: 16px;
font-size: 14px;
font-weight: 600;
color: rgba(0,0,0,0.85);
margin-bottom: 8px;
}
.lightTip {
height: 16px;
font-size: 14px;
font-weight: 400;
color: rgba(102,102,102,0.75);
margin-bottom: 12px;