作者 张晓杰

生产订单查看已派发工时,生产订单数量加单位(套)

... ... @@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="选择" :labelCol="labelCol" :wrapperCol="wrapperCol" >
<a-radio-group @change="onChange" v-model="selectedValue">
<a-radio-group @change="onChange" v-model="model.chooseStatus">
<a-radio :value="'0'" >
从物料表选择
</a-radio>
... ... @@ -37,7 +37,7 @@
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number
v-model="model.num"
placeholder="请输入数量"
placeholder="请输入数量(套)"
style="width: 100%"
/>
</a-form-model-item>
... ... @@ -207,7 +207,6 @@ export default {
},
created() {
this.loadTree()
this.model.chooseStatus = this.selectedValue
//备份model原始值
// this.modelDefault = JSON.parse(JSON.stringify(this.model))
},
... ... @@ -226,9 +225,12 @@ export default {
},
edit(record) {
this.model = Object.assign({}, record)
console.log('this.model',this.model)
this.modelDefault = this.model
// console.log('this.model:::::',this.model)
this.selectedValue = this.model.chooseStatus
if(!this.model.chooseStatus){
this.model.chooseStatus = '0'
}
this.visible = true
if (this.userInfo().username === 'admin') {
this.isBianhaoDisabled = true
... ... @@ -248,21 +250,21 @@ export default {
onChange(e) {
console.log('this.modelDefault',this.modelDefault)
if(!this.modelDefault.id){
if(e.target.value == 1){
if(e.target.value == '1'){
this.model = {}
this.model.chooseStatus = 1
}else if(e.target.value == 0){
this.model.chooseStatus = '1'
}else if(e.target.value == '0'){
this.model = {}
this.model.chooseStatus = 0
this.model.chooseStatus = '0'
}
}else if(this.modelDefault.id){
if(e.target.value == 1){
if(e.target.value == '1'){
this.model = {}
this.model.chooseStatus = 1
}else if(e.target.value == 0){
this.model.chooseStatus = '1'
}else if(e.target.value == '0'){
this.model = this.modelDefault
console.log(this.model)
// this.model.chooseStatus = 0
this.model.chooseStatus = '0'
}
}
... ...
... ... @@ -74,27 +74,9 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
:customRow="clickThenSelect"
@change="handleMyTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
<template slot="dispatchedWorkingHoursSlot" slot-scope="text,record">
<a v-if="text" @click="handleViewProductionPlan(record)" >{{ text }}</a>
</template>
<span slot="action" slot-scope="text, record">
<div v-if="record.assignDesignStatus === '0'">
<a @click="handleAssignDesign(record)" >派任务</a>
... ... @@ -117,6 +99,7 @@
<tblOrderForm-modal ref="modalForm" @ok="modalFormOk"></tblOrderForm-modal>
<AssignDesignModal ref="AssignDesignModal" @ok="modalFormOk"></AssignDesignModal>
<ViewOrdersModal ref="ViewOrdersModal" @ok="modalFormOk"></ViewOrdersModal>
<ViewProductionPlanModal ref="ViewProductionPlanModal" @ok="modalFormOk"></ViewProductionPlanModal>
</a-card>
</template>
... ... @@ -127,6 +110,7 @@
import { getAction } from '@/api/manage'
import AssignDesignModal from './modules/AssignDesignModal'
import ViewOrdersModal from './modules/ViewOrdersModal'
import ViewProductionPlanModal from './modules/ViewProductionPlanModal'
import {listProductType} from '@/api/ProductTpye'
import '@/assets/less/TableExpand.less'
... ... @@ -135,7 +119,7 @@
mixins:[JeecgListMixin],
components: {
TblOrderFormModal,
AssignDesignModal,ViewOrdersModal
AssignDesignModal,ViewOrdersModal,ViewProductionPlanModal
},
data () {
return {
... ... @@ -177,23 +161,23 @@
title:'产品类型',
align:"center",
dataIndex: 'productType',
customRender: function (text) {
if (text === 'XC') {
return '线槽'
} else if (text === 'JD') {
return '接地'
} else if (text === 'QZ') {
return '卡子'
} else if (text === 'GX') {
return '柜、箱、盒'
} else if (text === 'SJ') {
return '司机室'
} else if (text === 'FS') {
return '附属钢'
} else {
return text
}
},
// customRender: function (text) {
// if (text === 'XC') {
// return '线槽'
// } else if (text === 'JD') {
// return '接地'
// } else if (text === 'QZ') {
// return '卡子'
// } else if (text === 'GX') {
// return '柜、箱、盒'
// } else if (text === 'SJ') {
// return '司机室'
// } else if (text === 'FS') {
// return '附属钢'
// } else {
// return text
// }
// },
},
{
title:'任务下达时间',
... ... @@ -217,7 +201,7 @@
}
},
{
title:'数量',
title:'数量(套)',
align:"center",
dataIndex: 'quantity'
},
... ... @@ -229,7 +213,8 @@
{
title:'已派发工时',
align:"center",
dataIndex: 'dispatchedWorkingHours'
dataIndex: 'dispatchedWorkingHours',
scopedSlots: { customRender: 'dispatchedWorkingHoursSlot' },
},
// {
// title:'出货日期',
... ... @@ -342,7 +327,11 @@
this.$refs.ViewOrdersModal.edit(record);
this.$refs.ViewOrdersModal.disableSubmit = false;
},
handleViewProductionPlan(record){
console.log('handleViewProductionPlan',record)
this.$refs.ViewProductionPlanModal.edit(record);
this.$refs.ViewProductionPlanModal.disableSubmit = false;
},
initDictConfig(){
},
clickThenSelect(record) {
... ...
... ... @@ -17,8 +17,8 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity">
<a-input v-model="model.quantity" placeholder="请输入数量" disabled></a-input>
<a-form-model-item label="数量(套)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity">
<a-input v-model="model.quantity" placeholder="请输入数量(套)" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ...
... ... @@ -27,8 +27,8 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity">
<a-input v-model="model.quantity" placeholder="请输入数量"></a-input>
<a-form-model-item label="数量(套)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity">
<a-input v-model="model.quantity" placeholder="请输入数量(套)"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
... ...
... ... @@ -4,7 +4,7 @@
<a-spin :spinning="confirmLoading">
<div style="display: flex">
<div style="display:inline-block;width:50%;margin: auto;">
<table>
<table style="margin: auto;">
<tr>
<th scop="col" class="table_lable">订单号:</th>
<th scop="col">{{model.orderId}}</th>
... ... @@ -24,12 +24,13 @@
<tr>
<th scop="col" class="table_lable">产品类型:</th>
<th scop="col">
<span v-if="model.productType =='XC'">线槽</span>
{{model.productType}}
<!-- <span v-if="model.productType =='XC'">线槽</span>
<span v-if="model.productType =='JD'">接地</span>
<span v-if="model.productType =='QZ'">卡子</span>
<span v-if="model.productType =='GX'">柜、箱、盒</span>
<span v-if="model.productType =='SJ'">司机室</span>
<span v-if="model.productType =='FS'">附属钢</span>
<span v-if="model.productType =='FS'">附属钢</span> -->
</th>
</tr>
<tr>
... ... @@ -89,7 +90,7 @@ import { duplicateCheck } from '@/api/api'
import {listProductType} from '@/api/ProductTpye'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import moment from 'moment'
let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
// let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
export default {
name: "ViewOrdersModal",
mixins: [JeecgListMixin],
... ... @@ -98,7 +99,7 @@ export default {
data() {
return {
title: "生产订单详情",
baseURL:apiBaseUrl,
// baseURL:apiBaseUrl,
httpUrl:window._CONFIG['staticDomainURL']+'/',
options:[],
width: 1000,
... ... @@ -128,7 +129,7 @@ export default {
// this.model.status = '未下单'
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
console.log(apiBaseUrl)
// console.log(apiBaseUrl)
},
methods: {
add() {
... ...
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<a-table :columns="columns" :data-source="dataSource" style="width: auto" :pagination="false"></a-table>
</j-modal>
</template>
<script>
import ViewProductionPlanForm from './ViewProductionPlanForm'
import {querygx} from '@/api/manage'
export default {
name: 'ViewProductionPlanModal',
components: {
ViewProductionPlanForm
},
data () {
return {
title:'生产订单-已派发工时',
width:1200,
visible: false,
disableSubmit: false,
dataSource:[],
columns: [
{
title: '工序',
align: 'center',
dataIndex: 'workingProcedure',
},
{
title: '承接人',
align: 'center',
dataIndex: 'undertaker',
},
{
title: '工时',
align: 'center',
dataIndex: 'workHours',
},
{
title: '派发时间',
align: 'center',
dataIndex: 'dispatchTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '派发人',
align: 'center',
dataIndex: 'dispatchRen',
},
{
title: '验收时间',
align: 'center',
dataIndex: 'yanTime',
customRender: function (text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
},
},
{
title: '验收人',
align: 'center',
dataIndex: 'yanRen',
},
{
title: '验收结果',
align: 'center',
dataIndex: 'yanResult',
},
{
title: '备注',
align: 'center',
dataIndex: 'notes',
},
],
url: {
querygx: '/production/tblProductionPlan/querygx',
},
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
queryBynumber(orderNumber){
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.queryBynumber(orderNumber);
})
},
querygx(){
// var that = this;
const params = {
orderNumber:this.model.orderId,
productType:this.model.productTypeId
}
querygx(this.url.querygx,params).then((res)=>{
if(res.success){
console.log('res',res)
this.dataSource =res.result
// that.treeData = [];
// that.options = res.result
}
});
},
edit (record) {
this.model = Object.assign({}, record);
console.log('this.model',this.model)
this.visible = true;
this.querygx()
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>
\ No newline at end of file
... ...
... ... @@ -157,23 +157,23 @@
title:'产品类型',
align:"center",
dataIndex: 'productType',
customRender: function (text) {
if (text === 'XC') {
return '线槽'
} else if (text === 'JD') {
return '接地'
} else if (text === 'QZ') {
return '卡子'
} else if (text === 'GX') {
return '柜、箱、盒'
} else if (text === 'SJ') {
return '司机室'
} else if (text === 'FS') {
return '附属钢'
} else {
return text
}
},
// customRender: function (text) {
// if (text === 'XC') {
// return '线槽'
// } else if (text === 'JD') {
// return '接地'
// } else if (text === 'QZ') {
// return '卡子'
// } else if (text === 'GX') {
// return '柜、箱、盒'
// } else if (text === 'SJ') {
// return '司机室'
// } else if (text === 'FS') {
// return '附属钢'
// } else {
// return text
// }
// },
},
{
title:'任务下达时间',
... ... @@ -197,7 +197,7 @@
}
},
{
title:'数量',
title:'数量(套)',
align:"center",
dataIndex: 'quantity'
},
... ...
... ... @@ -5,22 +5,22 @@
<a-form-model ref="form" :model="model">
<a-row>
<a-col :span="24">
<a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder">
<a-form-model-item label="工作令" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrder" style="margin-bottom: -50px">
{{model.workOrder}}
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
<a-form-model-item label="产品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName" style="margin-bottom: -50px">
{{model.productName}}
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-model-item label="产品类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productType">
<a-col :span="24">
<a-form-model-item label="产品类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productType" style="margin-bottom: -50px">
{{model.productType}}
</a-form-model-item>
</a-col> -->
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity" style="margin-bottom: -50px">
{{model.quantity}}
</a-form-model-item>
</a-col>
... ...