bug 2
This commit is contained in:
		| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2024-03-13 14:47:44 | ||||
|  * @LastEditTime: 2024-03-15 15:34:58 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -17,30 +17,47 @@ | ||||
| 		</small-title> | ||||
| 		<div class="content"> | ||||
| 			<div class="formContent"> | ||||
| 				<el-row :gutter="20"> | ||||
| 					<el-col :span="8"> | ||||
| 						<div class="blodTip">工单名称</div> | ||||
| 						<div class="lightTip">{{ dataForm.name }}</div> | ||||
| 					</el-col> | ||||
| 					<el-col :span="8"> | ||||
| 						<div class="blodTip">工单编码</div> | ||||
| 						<div class="lightTip">{{ dataForm.code }}</div> | ||||
| 					</el-col> | ||||
| 					<el-col :span="8"> | ||||
| 						<div class="blodTip">产品名称</div> | ||||
| 						<div class="lightTip">{{ dataForm.productName }}</div> | ||||
| 					</el-col> | ||||
| 				</el-row> | ||||
| 				<el-row :gutter="20"> | ||||
| 					<el-col :span="8"> | ||||
| 						<div class="blodTip">产品规格</div> | ||||
| 						<div class="lightTip">{{ dataForm.specifications }}</div> | ||||
| 					</el-col> | ||||
| 					<el-col :span="8"> | ||||
| 						<div class="blodTip">实际生产数量</div> | ||||
| 						<div class="lightTip">{{ dataForm.expectedTime }}</div> | ||||
| 					</el-col> | ||||
| 				</el-row> | ||||
| 				<el-form :model="dataForm" ref="dataForm" label-width="120px" label-position="top" class="demo-ruleForm" :rules="rules"> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="8"> | ||||
| 							<el-form-item label="工单名称" prop="name"> | ||||
| 								<!-- <el-input v-model="dataForm.name" autocomplete="off"></el-input> --> | ||||
| 								<span>{{ dataForm.name }}</span> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="8"> | ||||
| 							<el-form-item label="工单编码" prop="code"> | ||||
| 								<span>{{ dataForm.code }}</span> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="8"> | ||||
| 							<el-form-item label="产品名称" prop="productName"> | ||||
| 								<span>{{ dataForm.productName }}</span> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="8"> | ||||
| 							<el-form-item label="产品规格" prop="specifications"> | ||||
| 								<span>{{ dataForm.specifications }}</span> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="8"> | ||||
| 							<el-form-item label="实际生产数量" prop="actualQuantity"> | ||||
| 								<el-input v-model.number="dataForm.actualQuantity" autocomplete="off" style="width: 80%" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="8"> | ||||
| 							<el-form-item label="实际生产完成时间" prop="finishProduceTime"> | ||||
| 								<el-date-picker | ||||
| 									v-model="dataForm.finishProduceTime" | ||||
| 									type="datetime" | ||||
| 									value-format="yyyy-MM-dd HH:mm:ss" | ||||
| 									placeholder="选择日期时间" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 				</el-form> | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="attr-list"> | ||||
| @@ -99,11 +116,11 @@ | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="drawer-body__footer"> | ||||
| 				<el-button style="" type="primary" @click="goback()">关闭</el-button> | ||||
| 				<el-button style="" @click="goback()">取消</el-button> | ||||
| 				<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()"> | ||||
| 					编辑 | ||||
| 				</el-button> | ||||
| 				<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> --> | ||||
| 				</el-button> --> | ||||
| 				<el-button type="primary" @click="dataFormSubmit()">确定</el-button> | ||||
| 			</div> | ||||
| 		</div> | ||||
|  | ||||
| @@ -117,7 +134,7 @@ | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { getConOrderList, updateConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder'; | ||||
| import { getConOrderList, updateConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder'; | ||||
| import SmallTitle from '../material/SmallTitle'; | ||||
| // import { parseTime } from '../../core/mixins/code-filter'; | ||||
| // import attrAdd from './attr-add'; | ||||
| @@ -148,11 +165,43 @@ export default { | ||||
| 			tableData: [], | ||||
| 			visible: false, | ||||
| 			isdetail: false, | ||||
| 			idAttrShow: false | ||||
| 			idAttrShow: false, | ||||
| 			rules: { | ||||
|         name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }], | ||||
|         finishProduceTime: [{ required: true, message: "实际生产完成时间不能为空", trigger: "change" }] | ||||
|       }, | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() {}, | ||||
| 	methods: { | ||||
| 		// 表单提交 | ||||
|     dataFormSubmit() { | ||||
|       this.$refs["dataForm"].validate((valid) => { | ||||
|         if (!valid) { | ||||
|           return false; | ||||
|         } | ||||
|         // 修改的提交 | ||||
|         if (this.dataForm.id) { | ||||
|           statusChange({ | ||||
| 						id: this.dataForm.id, | ||||
| 						status: 4, | ||||
| 						finishProduceTime: this.dataForm.finishProduceTime, | ||||
| 						actualQuantity: this.dataForm.actualQuantity | ||||
| 					}).then(response => { | ||||
|             this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!"); | ||||
|             this.visible = false; | ||||
|             this.$emit("refreshDataList"); | ||||
|           }); | ||||
|           return; | ||||
|         } | ||||
|         // 添加的提交 | ||||
|         // this.urlOptions.createURL(this.dataForm).then(response => { | ||||
|         //   this.$modal.msgSuccess("新增成功"); | ||||
|         //   this.visible = false; | ||||
|         //   this.$emit("refreshDataList"); | ||||
|         // }); | ||||
|       }); | ||||
|     }, | ||||
| 		initData() { | ||||
| 			// this.materialAttrList.splice(0); | ||||
| 			this.listQuery.total = 0; | ||||
| @@ -255,6 +304,9 @@ export default { | ||||
| }; | ||||
| </script> | ||||
| <style scoped> | ||||
| /* .item .el-form-item__label { | ||||
| 	color: red; | ||||
| } */ | ||||
| .drawer >>> .el-drawer { | ||||
| 	border-radius: 8px 0 0 8px; | ||||
| 	display: flex; | ||||
| @@ -263,6 +315,7 @@ export default { | ||||
|  | ||||
| .drawer >>> .el-form-item__label { | ||||
| 	padding: 0; | ||||
| 	font-weight: 600; | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-drawer__header { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user