From bd8f3a15f17facd2f77521da844eaf76dca22bad Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 22 三月 2024 10:02:25 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue | 239 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 225 insertions(+), 14 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue b/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
index 2b67b21..f3878a7 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
@@ -4,6 +4,7 @@
import request from "@/utils/request"
import {ElMessage} from "element-plus"
import {changeFilterEvent,filterChanged} from "@/hook"
+import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"
import {useI18n} from "vue-i18n"
const { t } = useI18n()
@@ -12,6 +13,7 @@
let dialogTableVisible = ref(false)
let craftVisible = ref(false)
const xGrid = ref()
+const trademarkLocation=ref(['宸︿笂','鍙充笂','宸︿笅','鍙充笅'])
const gridOptions = reactive({
border: "full",//琛ㄦ牸鍔犺竟妗�
keepSource: true,//淇濇寔婧愭暟鎹�
@@ -41,7 +43,7 @@
showStatus: true
},//琛ㄥご鍙傛暟
columns:[
- {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",},
+ {title: t('basicData.operate'), width: 220, slots: { default: 'button_slot' },fixed:"left",},
{field: 'orderNumber',width:120, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
//{field: 'orderDetail.buildingNumber',width:120, title: '妤煎彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
{field: 'orderDetail.productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
@@ -56,7 +58,7 @@
{field: 'area',width:120, title: t('craft.area'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
{field: 'orderDetail.quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
{field: 'process',width:120, title: t('craft.process'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
- {field: 'icon',width:120, title: t('order.icon'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
+ {field: 'icon',width:120, title: t('order.icon'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
{field: 'orderDetail.processingNote',width:120, title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
{field: 'orderDetail.remarks',width:120, title: t('basicData.remarks'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
{field: 'orderDetail.edgingType',width:120, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}
@@ -70,6 +72,17 @@
// { row: 0, col: 7, rowspan: 4, colspan: 1 },
// { row: 0, col: 8, rowspan: 4, colspan: 1 },
],
+ 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 },
+ ]
+ ]
+ }
+ },
toolbarConfig: {
buttons: [
{'code': 'remarks', 'name': t('order.processingNote')},
@@ -121,6 +134,51 @@
}
}
}
+ },
+ menuClick ({ menu, row, column }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (menu.code) {
+ case 'copyChecked' :{
+ let result = toolbarButtonClickEvent()
+ 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){
+ 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){
+ const dataList = xGrid.value.getTableData().visibleData
+ dataList.forEach((item,index) =>{
+ if(index>=result.start && index<=result.end){
+ item[result.cell] = ''
+ }
+ })
+ }
+ break
+ }
+ }
+ }
}
}
// 瀹氫箟琛ㄥご涓婁紶鏁版嵁
@@ -150,10 +208,29 @@
processingNote:''
})
+const trademarkAttr = ref({
+ trademark:null,
+ xImage:null,
+ yImage:null,
+ tag:null,
+ tag2:null ,
+ tag3:null,
+ xMargin:null,
+ yMargin:null,
+ location:[]
+
+})
+
let process = ref([])
request.get(`/basicData/BasicDataByType/product/process`).then((res) =>{
if (res.code==200){
process.value=res.data
+ }
+})
+const trademarkList =ref([])
+request.get(`/basicData/BasicDataByType/order/icon`).then((res) =>{
+ if (res.code==200){
+ trademarkList.value = res.data
}
})
@@ -165,6 +242,33 @@
})
rowIndex.value = row
}
+
+//淇敼鍟嗘爣閫夐」
+let trademarkVisible = ref(false)
+const updateTrademark = (row) => {
+ trademarkVisible.value= true
+ Object.keys(trademarkAttr.value).forEach((key) => {
+ if(key==='location'){
+ trademarkAttr.value[key] = []
+ }else{
+ trademarkAttr.value[key] = ''
+ }
+ })
+ if(row.icon!=null){
+ trademarkAttr.value = JSON.parse(row.icon)
+ }
+
+ rowIndex.value = row
+}
+
+const changeTrademark = ()=>{
+ rowIndex.value.icon = JSON.stringify(trademarkAttr.value)
+ trademarkVisible.value=false
+ Object.keys(trademarkAttr.value).forEach((key) => (trademarkAttr.value[key] = ''))
+}
+
+
+
const craftObj = reactive({
newCraft: [],
oldCraft: []
@@ -187,6 +291,7 @@
//鍒濆鍖栧垽鏂槸鍚︽湁id浼犲叆
onMounted(()=>{
+ addListener(xGrid.value,gridOptions)
const str = route.query.orderId
if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){
return
@@ -204,14 +309,11 @@
}
//鎸夐挳瀹℃牳杩囧悗鍙樹负鍙嶅
- if(res.data.order.orderReview === 2){
+ if(Math.abs(res.data.order.orderReview) === 2){
gridOptions.toolbarConfig.buttons[2].disabled = true
}
-
xGrid.value.reloadData(res.data.orderGlassDetails)
-
- //xGrid.value.reloadData(res.data.orderDetails)
}else{
ElMessage.error(res.msg)
}
@@ -235,10 +337,6 @@
}
})
}
-
-
-
-//
</script>
<template>
@@ -291,6 +389,7 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<template #button_slot="{ row }">
<el-button @click="updateCraft(row)" link type="primary" size="small">{{t('craft.updateCraft')}}</el-button>
+ <el-button @click="updateTrademark(row)" link type="primary" size="small">淇敼鍟嗘爣</el-button>
</template>
<template #num1_filter="{ column, $panel }">
@@ -303,7 +402,11 @@
</vxe-grid>
</div>
- <el-dialog v-model="dialogTableVisible" :title="$t('order.processingNote')" style="width: 60%;height:75% ">
+ <el-dialog
+
+ v-model="dialogTableVisible"
+ :title="$t('order.processingNote')"
+ style="width: 60%;height:75% ">
<el-input
v-model="titleUploadData.processingNote"
type="textarea"
@@ -311,7 +414,12 @@
/>
</el-dialog>
- <el-dialog v-model="craftVisible" :title="$t('craft.technologicalProcess')" style="width: 60%;height:60% ;position: relative;" >
+ <el-dialog id="processChange"
+ v-model="craftVisible"
+ :title="$t('craft.technologicalProcess')"
+ :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ style="width: 60%;height:60% ;position: relative;" >
<h5>{{$t('craft.processAttribute')}}</h5>
<el-checkbox
v-model="craftObj.newCraft"
@@ -335,9 +443,102 @@
<el-button type="primary" @click="saveCraft">{{$t('basicData.save')}}</el-button>
</el-col>
</el-row>
+ </el-dialog>
+ <el-dialog
+ id="trademark"
+ v-model="trademarkVisible"
+ :title="'鍟嗘爣鍙傛暟'"
+ :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ style="width: 60%;height:60% ;
+ position: relative;" >
+ <el-row>
+ <el-col :span="2">鍟嗘爣閫夐」:</el-col>
+ <el-col :span="3">
+ <el-select v-model="trademarkAttr.trademark"
+ >
+ <el-option :value="item.basicName" v-for="item in trademarkList" />
+ </el-select>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="2">X杞撮暅鍍�:</el-col>
+ <el-col :span="3">
+ <el-select v-model="trademarkAttr.xImage">
+ <el-option :value="true"/>
+ <el-option :value="false"/>
+ </el-select>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="2">Y杞撮暅鍍�:</el-col>
+ <el-col :span="3">
+ <el-select v-model="trademarkAttr.yImage">
+ <el-option :value="true"/>
+ <el-option :value="false"/>
+ </el-select>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="2">鎵撴爣浣胯兘:</el-col>
+ <el-col :span="3">
+ <el-select v-model="trademarkAttr.tag">
+ <el-option :value="true"/>
+ <el-option :value="false"/>
+ </el-select>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col :span="2">鏍囩2浣胯兘:</el-col>
+ <el-col :span="3">
+ <el-select v-model="trademarkAttr.tag2">
+ <el-option :value="true"/>
+ <el-option :value="false"/>
+ </el-select>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col :span="2">鏍囩3浣胯兘:</el-col>
+ <el-col :span="3">
+ <el-select v-model="trademarkAttr.tag3">
+ <el-option :value="true"/>
+ <el-option :value="false"/>
+ </el-select>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col :span="2">X杞磋竟璺�:</el-col>
+ <el-col :span="3">
+ <el-input-number v-model="trademarkAttr.xMargin"/>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col :span="2">Y杞磋竟璺�:</el-col>
+ <el-col :span="3">
+ <el-input-number v-model="trademarkAttr.yMargin"/>
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col :span="2">鍟嗘爣浣嶇疆:</el-col>
+ <el-col :span="8">
+ <el-checkbox v-model="trademarkAttr.location" v-for="item in trademarkLocation" :label="item" />
+ </el-col>
+ </el-row>
+
+ <el-row>
+ <el-col >
+ <el-button @click="changeTrademark" style="float:right;" type="primary" >{{$t('craft.sure')}}</el-button>
+ <el-button style="float:right;margin-right: 0.5rem" type="primary" >{{$t('craft.reset')}}</el-button>
+ </el-col>
+ </el-row>
</el-dialog>
</div>
@@ -359,10 +560,20 @@
width: 100%;
height: 90%;
}
-.el-dialog .el-col{
+#trademark .el-row,#trademark .el-col{
+ border: 0
+}
+#processChange .el-col{
border: 0;text-align: right
}
-.el-dialog .el-text{
+#processChange .el-text{
font-weight: bolder
}
+.vxe-grid {
+ /* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0