陈薪名 1 year ago
parent
commit
7d3bb9f98a
  1. 20
      src/components/TableHead/src/TableHead.vue
  2. 108
      src/components/XButton/src/ButtonBase.vue
  3. 36
      src/components/rowDrop/index.vue
  4. 20
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue
  5. 115
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

20
src/components/TableHead/src/TableHead.vue

@ -18,17 +18,18 @@
style="margin-right: 15px;" style="margin-right: 15px;"
></SearchNormal> --> ></SearchNormal> -->
<!-- 右侧按钮 --> <!-- 右侧按钮 -->
<ButtonBase :Butttondata="buttonsRight" @button-base-click="buttonBaseClick" /> <ButtonBase :Butttondata="buttonsRight" @button-base-click="buttonBaseClick" @updata-table-columns="updataTableColumns"
:allSchemas="allSchemas" ref="rowDropRef"/>
</div> </div>
</div> </div>
<slot></slot> <slot></slot>
</div> </div>
<!-- 字段设置弹窗 --> <!-- 字段设置弹窗 -->
<rowDrop <!-- <rowDrop
ref="rowDropRef" ref="rowDropRef"
@updata-table-columns="updataTableColumns" @updata-table-columns="updataTableColumns"
:allSchemas="allSchemas" :allSchemas="allSchemas"
/> /> -->
<!-- 高级筛选 --> <!-- 高级筛选 -->
<SearchHigh <SearchHigh
ref="searchHigh_Ref" ref="searchHigh_Ref"
@ -126,7 +127,7 @@ watch(
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
// //
if (val == 'set') { if (val == 'set') {
rowDropRef.value.popoverVisible = true rowDropRef.value.popoverVisible = !rowDropRef.value.popoverVisible
} else if (val == 'filtrate') { } else if (val == 'filtrate') {
searchHigh_Ref.value.popoverVisible = true searchHigh_Ref.value.popoverVisible = true
} else { } else {
@ -167,12 +168,17 @@ watch(
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.tableNavLeftBtns{
display: flex;
::v-deep(>div){
margin-right: 10px;
}
}
.tableNavRightBtns{ .tableNavRightBtns{
display: flex; display: flex;
margin-left: 10px; margin-left: 10px;
.currenButton .el-button { ::v-deep(>div){
margin-left: 10px !important; margin-left: 10px;
} }
} }
} }

108
src/components/XButton/src/ButtonBase.vue

@ -1,38 +1,84 @@
<template> <template>
<el-button <div v-for="(item, index) in Butttondata" :key="index">
v-for="(item, index) in Butttondata" :key="index" <el-button
v-show="!item.hide" v-show="!item.hide"
:type="item.type" :type="item.type"
:color="item.color" :color="item.color"
:link = "item.link ? item.link : false" :link="item.link ? item.link : false"
v-hasPermi="[item.hasPermi] || []" v-hasPermi="[item.hasPermi] || []"
@click="buttonBaseClick(item.name,item,$event)" v-if="item.name != 'set'"
> @click="buttonBaseClick(item.name, item, $event)"
<Icon v-if="item.icon" :icon="item.icon" class="mr-1px" /> >
{{ item.label }} <Icon v-if="item.icon" :icon="item.icon" class="mr-1px" />
</el-button> {{ item.label }}
</el-button>
<!-- 设置按钮 -->
<el-popover
:visible="popoverVisible"
placement="bottom"
:width="300"
trigger="click"
v-if="item.name == 'set'&&!item.hide"
>
<rowDrop
ref="rowDropRef"
@updata-table-columns="updataTableColumns"
:allSchemas="allSchemas"
@closeRowDrop="closeRowDrop"
@updataTableColumns="updataTableColumns"
/>
<template #reference>
<el-button
v-show="!item.hide"
:type="item.type"
:color="item.color"
:link="item.link ? item.link : false"
v-hasPermi="[item.hasPermi] || []"
@click="buttonBaseClick(item.name, item, $event)"
>
<Icon v-if="item.icon" :icon="item.icon" class="mr-1px" />
{{ item.label }}
</el-button>
</template>
</el-popover>
</div>
<slot></slot> <slot></slot>
</template> </template>
<script setup> <script setup>
import { Plus } from '@element-plus/icons-vue' import { Plus } from '@element-plus/icons-vue'
import { clearButtonBlurHandle } from '@/utils/index' import { clearButtonBlurHandle } from '@/utils/index'
const props = defineProps({ import rowDrop from '@/components/rowDrop/index.vue'
Butttondata: { const props = defineProps({
type: Array, Butttondata: {
default: () => { type: Array,
return [] default: () => {
} return []
}, }
}) },
allSchemas: {
type: Object,
default: null
}
})
// console.log('buttonsRight', props.Butttondata)
const emit = defineEmits([ //
'buttonBaseClick', const emit = defineEmits(['buttonBaseClick', 'updataTableColumns'])
])
const buttonBaseClick = (val, item, $event) => { const buttonBaseClick = (val, item, $event) => {
clearButtonBlurHandle($event)//el-button clearButtonBlurHandle($event) //el-button
emit('buttonBaseClick', val, item, $event) emit('buttonBaseClick', val, item, $event)
} }
const popoverVisible = ref(false)
//
const closeRowDrop = () => {
popoverVisible.value = false
}
defineExpose({
popoverVisible
})
//
const updataTableColumns = (val) => {
emit('updataTableColumns', val)
}
</script> </script>

36
src/components/rowDrop/index.vue

@ -1,20 +1,22 @@
<template> <template>
<Dialog title="字段设置" width="270" v-model="popoverVisible" :scroll="true" :maxHeight="500"> <!-- <Dialog title="字段设置" width="270" v-model="popoverVisible" :scroll="true" :maxHeight="500"> -->
<div class="test_wrapper" @dragover="dragover($event)"> <div class="test_wrapper" @dragover="dragover($event)">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handlecheckallchange">全部</el-checkbox> <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handlecheckallchange">全部</el-checkbox>
<el-checkbox-group v-model="checkedDataList" @change="handlecheckedchange"> <el-checkbox-group v-model="checkedDataList" @change="handlecheckedchange">
<draggable :list="allData" :force-fallback="true" chosen-class="chosen" animation="300" @end="dragend" @update="dragenter" > <draggable :list="allData" :force-fallback="true" chosen-class="chosen" animation="300" @end="dragend" @update="dragenter" >
<template #item="{element}"> <template #item="{element}">
<div><el-checkbox :key="element" :label="element">{{element}}</el-checkbox></div> <div><el-checkbox :key="element" :label="element">{{element}}</el-checkbox></div>
</template> </template>
</draggable> </draggable>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<template #footer> <div class="footer">
<!-- <template #footer> -->
<el-button size="small" @click="reset">重置</el-button> <el-button size="small" @click="reset">重置</el-button>
<el-button size="small" @click="closeRowDrop">关闭</el-button> <el-button size="small" @click="closeRowDrop">关闭</el-button>
</template> <!-- </template> -->
</Dialog> </div>
<!-- </Dialog> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
@ -68,7 +70,7 @@ const reset = () => {
// //
const closeRowDrop = () => { const closeRowDrop = () => {
popoverVisible.value = false emit('closeRowDrop')
} }
// //
@ -182,7 +184,8 @@ const updataTableColumns = (val) => {
// //
const emit = defineEmits([ const emit = defineEmits([
'updataTableColumns' 'updataTableColumns',
'closeRowDrop'
]) ])
/** 初始化 **/ /** 初始化 **/
@ -202,4 +205,11 @@ defineExpose({
// padding: 15px; // padding: 15px;
// border-top: #eee solid 1px; // border-top: #eee solid 1px;
// } // }
.test_wrapper{
max-height: calc(100vh - 350px);
overflow-y: auto;
}
.footer{
margin-top: 10px;
}
</style> </style>

20
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue

@ -97,7 +97,7 @@
<el-form-item label="抽检方式" class="flex-top" v-if="index == 1"> <el-form-item label="抽检方式" class="flex-top" v-if="index == 1">
<div class="checkbox"> <div class="checkbox">
<el-radio-group v-model="item.Value"> <el-radio-group v-model="item.Value">
<el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.SAMPLE_METHOD)" <el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.SAMPLE_METHOD)" @change="changeSampleMethod"
:key="cur.value">{{ cur.label }}</el-radio> :key="cur.value">{{ cur.label }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
@ -116,9 +116,9 @@
<el-input-number v-model="cur.CeilingQty" :min="cur.FloorQty + 1" class='ml-20px mr-20px' style="width:100px" <el-input-number v-model="cur.CeilingQty" :min="cur.FloorQty + 1" class='ml-20px mr-20px' style="width:100px"
controls-position="right" @blur="inputNumberBlur" /> controls-position="right" @blur="inputNumberBlur" />
<div>抽样数</div> <div>抽样数</div>
<el-input-number v-model="cur.SampleValue" :min="1" class='ml-20px mr-20px' style="width:100px" <el-input-number v-model="cur.SampleValue" :min="1" :max="formData.configuration[1].Value == 'QTY'?Infinity:100" class='ml-20px mr-20px' style="width:100px"
controls-position="right" @blur="inputNumberBlur" /> controls-position="right" @blur="inputNumberBlur" />
<div>EA</div> <div>{{formData.configuration[1].Value == 'QTY'?'EA':'%'}}</div>
</div> </div>
<div class="button flex"> <div class="button flex">
<div @click="handleAddTable(item.Value)"> <div @click="handleAddTable(item.Value)">
@ -248,6 +248,20 @@ const changeSupplierType = (e) => {
} }
getFormSupplierList() getFormSupplierList()
//
function changeSampleMethod(e){
console.log(e);
if(e == 'PERCENT'){
console.log(formData.value.configuration[2].Value)
formData.value.configuration[2].Value.forEach(cur=>{
if(cur.SampleValue>100){
cur.SampleValue=100
}
})
}
}
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, strategyCode: string, id?: number) => { const open = async (type: string, strategyCode: string, id?: number) => {
formStrategyCode.value = strategyCode formStrategyCode.value = strategyCode

115
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -14,6 +14,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true,
}, },
{ {
label: '任务单号', label: '任务单号',
@ -46,6 +47,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true,
}, },
{ {
label: '到月台代码', label: '到月台代码',
@ -100,7 +102,6 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromLocationTypes', field: 'fromLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE, dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string', dictClass: 'string',
isSearch: true,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
@ -112,7 +113,6 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'toLocationTypes', field: 'toLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE, dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string', dictClass: 'string',
isSearch: true,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
@ -252,7 +252,6 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'interfaceType', field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE, dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string', dictClass: 'string',
isSearch: true,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
@ -264,8 +263,10 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
fixed: 'left'
}, },
isSearch: true,
}, },
{ {
label: '业务类型', label: '业务类型',
@ -335,15 +336,51 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const PurchasereceiptRecordMainRules = reactive({ export const PurchasereceiptRecordMainRules = reactive({
requestNumber: [required], requestNumber: [
supplierCode: [required], { required: true, message: '请选择申请单号', trigger: 'change' }
toWarehouseCode: [required], ],
outTransaction: [required], supplierCode: [
inTransaction: [required], { required: true, message: '请选择供应商代码', trigger: 'change' }
executeTime: [required], ],
activeDate: [required], toWarehouseCode: [
toLocationTypes: [required], { required: true, message: '请选择到仓库代码', trigger: 'change' }
available: [required], ],
toLocationTypes: [
{ required: true, message: '请选择到库位类型服务', trigger: 'change' }
],
outTransaction: [
{ required: true, message: '请输入出库事务类型', trigger: 'blur' }
],
inTransaction: [
{ required: true, message: '请输入入库事务类型', trigger: 'blur' }
],
executeTime: [
{ required: true, message: '请输入执行时间', trigger: 'change' }
],
activeDate: [
{ required: true, message: '请输入生效日期', trigger: 'change' }
],
available: [
{ required: true, message: '请输入是否可用', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
createTime: [
{ required: true, message: '请选择创建时间', trigger: 'change' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
}) })
/** /**
@ -827,5 +864,55 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
// 表单校验 // 表单校验
export const PurchasereceiptRecordDetailRules = reactive({ export const PurchasereceiptRecordDetailRules = reactive({
fromPackingNumber: [required], fromPackingNumber: [
{ required: true, message: '请选择从包装号', trigger: 'change' }
],
toPackingNumber: [
{ required: true, message: '请选择到包装号', trigger: 'change' }
],
fromBatch: [
{ required: true, message: '请输入从批次', trigger: 'blur' }
],
toBatch: [
{ required: true, message: '请输入到批次', trigger: 'blur' }
],
arriveDate: [
{ required: true, message: '请选择到货日期', trigger: 'change' }
],
produceDate: [
{ required: true, message: '请选择生产日期', trigger: 'change' }
],
expireDate: [
{ required: true, message: '请选择过期日期', trigger: 'change' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
toLocationCode: [
{ required: true, message: '请选择到库位代码', trigger: 'change' }
],
toLocationGroupCode: [
{ required: true, message: '请选择到库位组代码', trigger: 'change' }
],
toAreaCodes: [
{ required: true, message: '请选择到库区代码', trigger: 'change' }
],
poNumber: [
{ required: true, message: '请选择订单号', trigger: 'change' }
],
poLine: [
{ required: true, message: '请选择订单行', trigger: 'change' }
],
stdPackQty: [
{ required: true, message: '请输入标包数量', trigger: 'blur' }
],
stdPackUnit: [
{ required: true, message: '请选择标包单位', trigger: 'change' }
],
convertRate: [
{ required: true, message: '请输入转换率', trigger: 'blur' }
],
visualInspectResult: [
{ required: true, message: '请选择目检结果', trigger: 'change' }
],
}) })
Loading…
Cancel
Save