From acaf8ca38cd32bc474bb46b593db2a8d75b9bfdd Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期六, 12 十月 2024 08:26:23 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 470 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 418 insertions(+), 52 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index 953e4f2..c4c6653 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1,14 +1,18 @@
<script setup>
-import {computed, nextTick, onMounted, reactive, ref, toRefs} from "vue";
+import {computed, nextTick, onMounted, onUnmounted, reactive, ref, toRefs} from "vue";
import {useRouter,useRoute} from 'vue-router'
import request from "@/utils/request";
import {ElMessage} from "element-plus";
import {changeFilterEvent, filterChanged} from "@/hook"
+import domZIndex from 'dom-zindex'
import {indexOf} from "xe-utils";
import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove";
import userInfo from "@/stores/userInfo"
import { useI18n } from 'vue-i18n'
import footSum from "@/hook/footSum"
+import companyInfo from "@/stores/sd/companyInfo"
+domZIndex.setCurrent(3000)
+const company = companyInfo()
//璇█鑾峰彇
const { t } = useI18n()
let brokenVisible = ref(false)
@@ -66,6 +70,7 @@
})
let detail = ref([])
let layer=''
+let technologicalProcess=''
//瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁
const titleSelectJson = ref({
@@ -82,6 +87,8 @@
})
+
+
let inputDisabled = ref(false)
onMounted(() =>{
if(route.query.processId !== undefined && route.query.processId!=='' && route.query.processId!=null ){
@@ -95,6 +102,31 @@
titleUploadData.value = res.data.reportingWork
titleSelectJson.value = res.data.basic
layer= res.data.layer
+
+ //娣诲姞琛ョ墖鐘舵�佸垪
+ let column = {field: 'patchStatusOther', width: 90,title: res.data.title}
+ gridOptions.columns.push(column)
+
+ const s01Values = [];
+ for (let i = 0; i < res.data.reportingWorkDetails.length; i++) {
+ const s01Values = [];
+ // 閬嶅巻 detailList 鏁扮粍锛屾彁鍙� S01 鍊煎埌 s01Values 鏁扮粍
+ if (res.data.reportingWorkDetails[i].other_columns!=null|| res.data.reportingWorkDetails[i].other_columns!=undefined){
+ res.data.reportingWorkDetails.forEach(element => {
+ const otherColumnsObject = JSON.parse(element.other_columns);
+ const s01Value = otherColumnsObject.S01;
+ s01Values.push(s01Value || ''); // 濡傛灉 S01 鍊间负绌猴紝娣诲姞绌哄瓧绗︿覆鎴栬�呭叾浠栭粯璁ゅ��
+ });
+
+ // 灏� s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
+ res.data.reportingWorkDetails.forEach((detail, index) => {
+ detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 璧嬪�肩粰 s01Value 灞炴��
+ });
+ }
+
+ }
+
+
//titleUploadData.value.processId=titleUploadData.value.processId+'/'+layer
xGrid.value.reloadData(res.data.reportingWorkDetails)
let button = {
@@ -107,6 +139,7 @@
titleUploadData.value.qualityInspector=user.user.userName
}
+
gridOptions.toolbarConfig.buttons.push(button)
}
// getQuantity()
@@ -116,7 +149,6 @@
})
const data = [{id:1,num:2},{id:1,num:3},{id:2,num:2},{id:1,num:2}];
-
//琛ㄥ熬姹傚拰
const sumNum = (list, field) => {
@@ -151,7 +183,7 @@
align: 'center',//鏂囧瓧灞呬腑
stripe: true,//鏂戦┈绾�
rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
- id: 'CustomerList',
+ id: 'AddReportingWork_1',
showFooter: true,//鏄剧ず鑴�
printConfig: {},
importConfig: {},
@@ -168,16 +200,77 @@
customConfig: {
storage: true
},
+ mouseConfig:{selected: true},//榧犳爣閫変腑
+ keyboardConfig:{
+ isArrow: true,
+ isDel: true,
+ isEnter: true,
+ isTab: true,
+ isEdit: true,
+ isChecked: true
+ },
editConfig: {
- trigger: 'click',
+ trigger: 'dblclick',
mode: 'row',
showStatus: true
- },//琛ㄥご鍙傛暟
+ },
+ menuConfig: {
+ body: {
+ //鍙抽敭鑿滃崟
+ options: [
+ [
+ {
+ code: 'copyChecked',
+ name: t('basicData.selectSame'),
+ prefixIcon: 'vxe-icon-copy',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'copyAll',
+ name: t('basicData.sameAfterwards'),
+ prefixIcon: 'vxe-icon-feedback',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'clearChecked',
+ name: t('basicData.clearSelection'),
+ prefixIcon: 'vxe-icon-indicator',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'SecondaryBreakage',
+ name: "搴忓彿娆$牬鐩稿悓",
+ prefixIcon: 'vxe-icon-indicator',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'checkedBreakage',
+ name: "閫変腑娆$牬鐩稿悓",
+ prefixIcon: 'vxe-icon-indicator',
+ visible: true,
+ disabled: false
+ },
+ ]
+ ]
+ }
+ },
+ //琛ㄥご鍙傛暟
columns: [
// {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
{
field: 'order_number',
title: t('order.OrderNum'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+ {
+ field: 's01Value',
+ title: t('reportingWorks.glassNumber'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
@@ -262,6 +355,8 @@
return new Error(t('reportingWorks.enterIntegerGreaterThanEqualTo'))
}else if((row.completedQuantity*1+brokenNum*1)>row.quantity*1){
return new Error((`${row.completedQuantity}+${brokenNum}>${row.quantity}`))
+ }else if(row.quantity_card<row.completedQuantity){
+ return new Error("瀹屽伐鏁颁笉鑳藉ぇ浜庢祦绋嬪崱鏁伴噺")
}
if(titleUploadData.value.reportingWorkId!=null && row.completedQuantity<row.minQuantity){
return new Error(`${t('reportingWorks.pleaseGreaterThanOrEqual1')}
@@ -337,13 +432,26 @@
break
}
case 'update': {
- getQuantity()
- const errMap = await $grid.validate(true)
- if (errMap) {
- ElMessage.error(t('basicData.msg.checkoutLose'))
- return
- }
- saveReportingWork(0,'update')
+ //鏍规嵁琛ョ墖鐘舵�佸垽鏂槸鍚﹁兘淇敼
+ // request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => {
+ // if (res.code == 200) {
+ // if (res.data > 0) {
+ // ElMessage.error("璇ユ姤宸ュ寘鍚凡琛ョ墖鏁版嵁锛屼笉鍙慨鏀�!")
+ // return
+ // } else {
+ getQuantity()
+ const errMap = await $grid.validate(true)
+ if (errMap) {
+ ElMessage.error(t('basicData.msg.checkoutLose'))
+ return
+ }
+ saveReportingWork(0, 'update')
+ // }
+ // } else {
+ // ElMessage.warning(res.msg)
+ // }
+ // })
+
break
}
}
@@ -357,9 +465,116 @@
}
//brokenGrid.value.reloadData(brokenRow.damageDetail)
//鏀瑰彉brokenVisible鐨勫�艰Е鍙憃penedBrokenTable锛堬級鏂规硶
- brokenVisible.value = true
+ const { rows, column, cell } = params; // 瑙f瀯鑾峰彇琛屻�佸垪鍜屽崟鍏冩牸淇℃伅
+ //鐐瑰嚮娆$牬鏁伴噺鏃舵墦寮�鏄庣粏鐣岄潰
+ if(column.field=="breakageQuantity"){
+ if (row.patchStatusOther!="宸茶ˉ鐗�"){
+ brokenVisible.value = true
+ }
+ }
+ },
+ menuClick({menu, row, column}) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (menu.code) {
+ case 'copyChecked' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "completedQuantity"){
+ if (result) {
+ const dataList = xGrid.value.getTableData().visibleData
+ const val = dataList[result.start][result.cell]
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item[result.cell] = val
+ }
+ })
+ }
+ }
- }
+ break
+ }
+ case 'copyAll' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "completedQuantity" ) {
+ if (result) {
+ const dataList = xGrid.value.getTableData().visibleData
+ const val = dataList[result.start][result.cell]
+ dataList.forEach((item, index) => {
+ if (index >= result.start) {
+ item[result.cell] = val
+ }
+ })
+ }
+ }
+ break
+ }
+ case 'clearChecked' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "completedQuantity" ) {
+ if (result) {
+ const dataList = xGrid.value.getTableData().visibleData
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item[result.cell] = ''
+ }
+ })
+ }
+ }
+ break
+ }
+ case 'SecondaryBreakage' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "breakageQuantity" || result.cell === "completedQuantity"){
+ if (result) {
+ const dataList = xGrid.value.getTableData().visibleData
+ const seenOrders = {}
+ dataList.forEach((item, index) => {
+ const list = item.damageDetails
+ if (list!== null || list.length > 0){
+ const { order_number, damageDetails, breakageQuantity } = item;
+ // 濡傛灉 order_number 杩樻病鏈夊鐞嗚繃
+ if (!seenOrders[order_number]) {
+ // 璁板綍绗竴涓嚭鐜扮殑 damageDetails 鍜� breakageQuantity
+ seenOrders[order_number] = {
+ damageDetails,
+ breakageQuantity
+ };
+ } else {
+ // 灏嗗悗缁殑 damageDetails 鍜� breakageQuantity 鏇存柊涓虹涓�涓殑
+ item.damageDetails = seenOrders[order_number].damageDetails;
+ item.breakageQuantity = seenOrders[order_number].breakageQuantity;
+ }
+ }
+
+ })
+ }
+ }
+ break
+ }
+ case 'checkedBreakage' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "breakageQuantity" || result.cell === "completedQuantity"){
+ if (result) {
+ const dataList = xGrid.value.getTableData().visibleData
+ const val = dataList[result.start].damageDetails
+ const quantity = dataList[result.start].breakageQuantity
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item.damageDetails = val
+ item.breakageQuantity = quantity
+ if (index!=result.start){
+ item.completedQuantity = item.completedQuantity - quantity
+ }
+
+ }
+ })
+ }
+ }
+ break
+ }
+ }
+ }
+ },
}
@@ -370,7 +585,7 @@
align: 'center',//鏂囧瓧灞呬腑
stripe: true,//鏂戦┈绾�
rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
- id: 'CustomerList',
+ id: 'AddReportingWork_2',
//showFooter: true,//鏄剧ず鑴�
printConfig: {},
importConfig: {},
@@ -393,6 +608,7 @@
showStatus: true
},//琛ㄥご鍙傛暟
columns: [
+ {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78},
{type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 },
// {
// field: 'order_number',
@@ -442,7 +658,7 @@
},
{
field: 'responsiblePersonnel',
- title: t('reportingWorks.responsiblePersonnel'),
+ title: '璐d换淇℃伅',
editRender: {name: 'input', attrs: {placeholder: ''}}
},
@@ -508,9 +724,10 @@
break
}
case 'removeRow': {
- let result = toolbarButtonClickEvent()
- if(result){
- $grid.remove(result.row)
+ const $grid = brokenGrid.value
+ const checkedList = $grid.getCheckboxRecords()
+ if(checkedList){
+ $grid.remove(checkedList)
}
break
}
@@ -519,7 +736,7 @@
}
}
const openedBrokenTable = () => {
- addListener(brokenGrid.value,brokenGridOptions)
+ //addListener(brokenGrid.value,brokenGridOptions)
let damage =ref(brokenRow.value.damageDetails)
brokenGrid.value.reloadData(damage.value)
}
@@ -561,8 +778,12 @@
return row.order_number === brokenRow.value.order_number
})
const maxQuantity = Math.max(...equalByOrderNum.map(item =>item.breakageQuantity || 0))
+ let process = titleUploadData.value.thisProcess
equalByOrderNum.forEach((row) =>{
- row.completedQuantity= brokenRow.value.quantity*1-maxQuantity
+ if (process=='澶硅兌' || process=='涓┖' || process=='鍖呰' ||process=='鎵撹兌鍜岀矘妗�'){
+ row.completedQuantity= brokenRow.value.quantity*1-maxQuantity
+ }
+
})
@@ -573,10 +794,20 @@
//绗竴娆″姞杞芥暟鎹�
-
-request.post(`/reportingWork/selectProcess`).then((res) => {
+let groupChangeProcess = ref(false)//鐢ㄤ簬鏈彮缁勬樉绀洪棶棰�
+request.post(`/reportingWork/selectProcess/${user.user.userId}`).then((res) => {
if (res.code == 200) {
- titleSelectJson.value.processType = res.data.process;
+ titleSelectJson.value.processType = res.data.process
+ if(user.user.address!==null && user.user.address!==''){
+ titleUploadData.value.thisProcess = user.user.address
+ titleUploadData.value.teamsGroupsName = user.user.userName
+ groupChangeProcess.value = true
+ if (user.user.address==='鎶�鏈儴澶氭洸' || user.user.address==='澶硅兌'){
+ groupChangeProcess.value = false
+ }
+ gridOptions.toolbarConfig.buttons[1].visible=false
+ }
+
} else {
ElMessage.warning(res.msg)
}
@@ -640,16 +871,15 @@
const notFinishList = xGrid.value.getTableData().fullData.filter(item =>{
return item.saveFlag === 0
})
-
+ let process = titleUploadData.value.thisProcess
for(let item of uniqueByOrderNum){
- if(!checkSameNumForId(notFinishList,item.order_number)){
+ if(!checkSameNumForId(notFinishList,item.order_number ) && (process=='澶硅兌' || process=='涓┖' || process=='鍖呰' ||process=='鎵撹兌鍜岀矘妗�')){
ElMessage.error(`${t('reportingWorks.pleaseCheckTheOrderNumber1')}':'
${item.order_number}
${t('reportingWorks.pleaseCheckTheOrderNumber1')}`)
return false
}
}
-
titleUploadData.value.creator = user.user.userName
titleUploadData.value.creatorId = user.user.userId
@@ -658,15 +888,18 @@
const b = (row.breakageQuantity !== undefined && row.breakageQuantity !== null && row.breakageQuantity !== '' && row.breakageQuantity*1!==0)
return (a || b)
})
- if(requestDetailData.length === 0){
+ if(requestDetailData.length === 0 && (route.query.reportingWorkId===undefined)){
ElMessage.warning(t('reportingWorks.atLeastOneFinishedAndWornEligible'))
return false
}
-
+ let status=company.qualityInsStatus
const requestData = {
title:titleUploadData.value,
detail:xGrid.value.getTableData().fullData,
- type:state//瀹℃牳鐘舵��
+ type:state,//瀹℃牳鐘舵��
+ userId:user.user.userId,
+ userName:user.user.userName,
+ qualityInsStatus:status
}
gridOptions.toolbarConfig.buttons[0].disabled=true
gridOptions.toolbarConfig.buttons[1].disabled=true
@@ -695,7 +928,7 @@
ElMessage.error(msg)
}
}).catch(err =>{
- ElMessage.error(err.message)
+ ElMessage.error('鎻愪氦澶辫触锛岃鍒锋柊鍚庨噸璇�')
}).finally(()=>{
gridOptions.toolbarConfig.buttons[0].disabled=false
@@ -732,6 +965,7 @@
})
// 鏌ヨ璐d换鐝粍
const computedResponsibleTeam = computed((responsibleProcess) => {
+ titleSelectJson.value.historyTeams.push({basic_name: user.user.userName, process: titleUploadData.value.thisProcess, basic_type: 'teamsgroups', basic_category: 179, id: 555})
return function (responsibleProcess){
return titleSelectJson.value.historyTeams.filter((item) => {
return item.process === responsibleProcess
@@ -772,9 +1006,20 @@
ElMessage.warning(t('reportingWorks.firstProcessNotReview'))
return
}
+ //鍖归厤鈥�/鈥濆墠鍚庡瓧绗︿覆
+ const regex = /([^\/]+)\/([^\/]+)/;
+ //鏌ユ壘鍖归厤鐨勫瓧绗︿覆
+ const result = processId.match(regex);
+ //娴佺▼鍗″彿
+ let processIdStr = result[1];
+ //灞傚彿
+ let technologyStr = result[2];
const reportWork = {
process: titleUploadData.value.previousProcess,
- processId:processId
+ processId:processId,
+ thisProcess:titleUploadData.value.thisProcess,
+ technologyStr:technologyStr,
+ userName:user.user.userName
}
loadingFlag.value= true
request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{
@@ -820,11 +1065,13 @@
ElMessage.warning(t('reportingWorks.selectProcess'))
return
}
-
- if (titleSelectJson.value.thisProcessType.indexOf(process) === -1 && process !== t('machine.cutting') && titleSelectJson.value.thisProcessType !== "") {
- ElMessage.warning(t('reportingWorks.thisProcessNotProcessCard'))
- return
+ if (titleSelectJson.value.thisProcessType.length!=0){
+ if (titleSelectJson.value.thisProcessType.indexOf(process) === -1 && process !== t('machine.cutting')) {
+ ElMessage.warning(t('reportingWorks.thisProcessNotProcessCard'))
+ return
+ }
}
+
//鍖归厤鈥�/鈥濆墠鍚庡瓧绗︿覆
const regex = /([^\/]+)\/([^\/]+)/;
//鏌ユ壘鍖归厤鐨勫瓧绗︿覆
@@ -832,18 +1079,20 @@
//娴佺▼鍗″彿
let processIdStr = result[1];
//灞傚彿
-
let technologyStr = result[2];
- request.post(`/reportingWork/addSelectLastWork/${processIdStr}/${technologyStr}/${process}`).then((res) => {
+
+ let reportType= company.reportType
+ request.post(`/reportingWork/addSelectLastWork/${processIdStr}/${technologyStr}/${process}/${reportType}`).then((res) => {
if (res.code == 200) {
if(res.data.data==null){
ElMessage.error(t('reportingWorks.noDataThisProcessCard'))
return
}
-
+ technologicalProcess=res.data.technologicalProcess
//琛ㄥご璧嬪��
titleUploadData.value = res.data.data
titleUploadData.value.processId = processId
+ titleUploadData.value.teamsGroupsName = user.user.userName
//璁惧涓嬫媺妗�
titleSelectJson.value.deviceType = res.data.device
//鐝粍涓嬫媺妗�
@@ -873,6 +1122,29 @@
//鍒ゆ柇鏃╂櫄鐝�
titleUploadData.value.classes=t('reportingWorks.early')
titleUploadData.value.reportingWorkTime = formatCurrentTime()
+
+ //澶勭悊缂栧彿鍒�
+ //瀹氫箟瀛樻斁缂栧彿鏁扮粍
+ const s01Values = [];
+ for (let i = 0; i < res.data.Detail.length; i++) {
+ const s01Values = [];
+ // 閬嶅巻 detailList 鏁扮粍锛屾彁鍙� S01 鍊煎埌 s01Values 鏁扮粍
+ if (res.data.Detail[i].other_columns!=null|| res.data.Detail[i].other_columns!=undefined){
+ res.data.Detail.forEach(element => {
+ const otherColumnsObject = JSON.parse(element.other_columns);
+ const s01Value = otherColumnsObject.S01;
+ s01Values.push(s01Value || ''); // 濡傛灉 S01 鍊间负绌猴紝娣诲姞绌哄瓧绗︿覆鎴栬�呭叾浠栭粯璁ゅ��
+ });
+
+ // 灏� s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
+ res.data.Detail.forEach((detail, index) => {
+ detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 璧嬪�肩粰 s01Value 灞炴��
+ });
+ }
+
+ }
+
+
//缁戝畾涓嬫柟琛ㄦ牸
detail.value = res.data.Detail
xGrid.value.reloadData(detail.value)
@@ -927,9 +1199,10 @@
}
const editClosedEvent = ({ row, column }) => {
+ let process = titleUploadData.value.thisProcess
if (column.property==='completedQuantity') {
xGrid.value.getTableData().fullData.forEach((item, index) =>{
- if(item.order_number===row.order_number){
+ if(item.order_number===row.order_number && (process=='澶硅兌' || process=='涓┖' || process=='鍖呰' ||process=='鎵撹兌鍜岀矘妗�')){
item.completedQuantity=row.completedQuantity
}
})
@@ -961,6 +1234,83 @@
const $grid = xGrid.value
this.$grid.commitProxy('data', yourData)
}
+onMounted(() => {
+ window.addEventListener('keypress', qrcodeScanner);
+ addListener(xGrid.value, gridOptions)
+})
+
+// 鍦ㄧ粍浠跺嵏杞芥椂绉婚櫎閿洏浜嬩欢鐩戝惉
+onUnmounted(() => {
+ window.removeEventListener('keypress', qrcodeScanner);
+})
+
+let code = '';
+let codeArr = [];
+let lastTime,nextTime = ''
+let lastCode,nextCode = ''
+const qrcodeScanner = (e) =>{
+
+ nextCode = e.key;
+
+
+ // 褰撳墠瑙﹀彂鏃堕棿
+ nextTime = new Date().getTime();
+ // 绗竴娆¤幏鍙�
+ if(!lastTime && !lastCode && e.key !== 'Enter'){
+ codeArr = []
+ codeArr.push(e.key)
+ }
+
+ if(lastCode && lastTime && (nextTime - lastTime > 50)){
+ // 鐩搁殧鏃堕棿澶т簬30 璇存槑涓嶆槸鎵爜鏋壂鎻忕殑 娓呯┖閲嶆柊
+ codeArr = []
+ // 褰撴壂鐮佸墠鏈塳eypress浜嬩欢鏃�,闃叉棣栧瓧缂哄け
+ } else if(lastCode && lastTime && e.key !== 'Enter'){
+ codeArr.push(e.key)
+ }
+ lastCode = nextCode
+ lastTime = nextTime
+ // 鎵弿缁撴潫
+ if(e.keyCode === 13){
+ // 鍙繘琛屼笅涓�姝ユ搷浣�
+ /* 涓嬩竴姝ユ搷浣� */
+ if(codeArr.length!==0){
+ titleUploadData.value.processId = codeArr.join('')
+ }
+ if(user.user.address!==null || user.user.address!==''){
+ getWork()
+ }
+
+ codeArr=[]
+ lastTime = ''
+ nextTime = ''
+ lastCode = ''
+ nextCode = ''
+ }
+
+}
+
+
+const cellClassName = ({ row, column }) => {
+ if (column.field === 'breakageQuantity') {
+ return 'col-red'
+ }
+
+}
+const changeRowClass = ({ row, rowIndex, $rowIndex }) => {
+ return row?.rowClass
+
+}
+const editConfigDisable = reactive({
+ trigger: 'click',
+ mode: 'cell',
+ beforeEditMethod ({ row }) {
+ if (row.patchStatusOther === '宸茶ˉ鐗�') {
+ return false
+ }
+ return true
+ }
+})
</script>
@@ -970,7 +1320,11 @@
<el-input :disabled="inputDisabled" v-if="titleUploadData.reportingWorkId" v-model="titleUploadData.reportingWorkId" :placeholder="$t('reportingWorks.reportingWorkId')" style="width: 200px" />
<el-input :disabled="inputDisabled" v-model="titleUploadData.processId" :placeholder="$t('processCard.processId')" style="width: 200px" @keyup.enter.native="getWork();getQuantity()"/>
- <el-select :disabled="inputDisabled" v-model="titleUploadData.thisProcess" clearable :placeholder="$t('reportingWorks.selectProcess')" style="width: 120px"
+ <el-select :disabled="inputDisabled || groupChangeProcess"
+ v-model="titleUploadData.thisProcess"
+ clearable
+ :placeholder="$t('reportingWorks.selectProcess')"
+ style="width: 120px"
@change="getWork();getQuantity()">
<el-option
v-for="item in titleSelectJson['processType']"
@@ -984,7 +1338,7 @@
</el-button>
<!-- <el-button type="primary">瀹℃牳涓嶉�氳繃</el-button>-->
- <label>{{$t('reportingWorks.processCardArea')}}锛�</label>
+ <label>{{technologicalProcess}}</label>
</div>
<div style="background-color: white;margin-bottom: 5px;height: 17%;width: 100%">
<el-row>
@@ -1013,10 +1367,11 @@
<el-text class="customClass"></el-text>
</el-col>
<el-col :span="2">
- <el-text>{{$t('order.project')}}锛�</el-text>
+ <el-text >{{$t('order.project')}}锛�</el-text>
</el-col>
<el-col :span="3">
- <el-text wrap-text="false">{{ titleUploadData.order.project }}</el-text>
+ <el-input :readonly="true" v-model="titleUploadData.order.project"/>
+<!-- <el-text style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ titleUploadData.order.project }}</el-text>-->
</el-col>
</el-row>
@@ -1067,7 +1422,10 @@
<el-text>{{$t('reportingWorks.teamsType')}}锛�</el-text>
</el-col>
<el-col :span="3">
- <el-select v-model="titleUploadData.teamsGroupsName" clearable :placeholder="$t('reportingWorks.selectTeam')">
+ <el-select :disabled="groupChangeProcess"
+ v-model="titleUploadData.teamsGroupsName"
+ clearable
+ :placeholder="$t('reportingWorks.selectTeam')">
<el-option
v-for="item in titleSelectJson['teamsType']"
:key="item.id"
@@ -1122,12 +1480,15 @@
<vxe-grid
ref="xGrid"
class="mytable-scrollbar"
+ :row-class-name="changeRowClass"
max-height="100%"
- height="400px"
+ height="100%"
size="small"
v-bind="gridOptions"
v-on="gridEvents"
@edit-closed="editClosedEvent"
+ :cell-class-name="cellClassName"
+ :edit-config="editConfigDisable"
>
@@ -1192,9 +1553,7 @@
<!-- 鍒虹牬绫诲瀷breakageType -->
<template #breakageType="{ row }">
<vxe-select v-model="row.breakageType "
- filterable
- clearable
- placeholder="">
+ clearable placeholder=" " allow-create filterable>
<vxe-option v-for="item in titleSelectJson.breakageType" :key="item.id" :label="item.basic_name" :value="item.basic_name"/>
</vxe-select>
</template>
@@ -1205,9 +1564,7 @@
<!--娆$牬鍘熷洜-->
<template #breakageReason="{ row }">
<vxe-select v-model="row.breakageReason "
- filterable
- clearable
- placeholder="">
+ clearable placeholder=" " allow-create filterable>
<vxe-option v-for="item in titleSelectJson.breakageReason" :key="item.id" :label="item.basic_name" :value="item.basic_name"/>
</vxe-select>
</template>
@@ -1324,4 +1681,13 @@
user-select: none;
}
+::v-deep(.mytable-scrollbar .col-red) {
+ background-color: rgb(66,159,254);
+ color: #fff;
+}
+
+
+::v-deep(.latter) {
+ //display: none;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0