陈薪名 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;"
></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>
<slot></slot>
</div>
<!-- 字段设置弹窗 -->
<rowDrop
<!-- <rowDrop
ref="rowDropRef"
@updata-table-columns="updataTableColumns"
:allSchemas="allSchemas"
/>
/> -->
<!-- 高级筛选 -->
<SearchHigh
ref="searchHigh_Ref"
@ -126,7 +127,7 @@ watch(
const buttonBaseClick = (val, item) => {
//
if (val == 'set') {
rowDropRef.value.popoverVisible = true
rowDropRef.value.popoverVisible = !rowDropRef.value.popoverVisible
} else if (val == 'filtrate') {
searchHigh_Ref.value.popoverVisible = true
} else {
@ -167,12 +168,17 @@ watch(
display: flex;
justify-content: space-between;
}
.tableNavLeftBtns{
display: flex;
::v-deep(>div){
margin-right: 10px;
}
}
.tableNavRightBtns{
display: flex;
margin-left: 10px;
.currenButton .el-button {
margin-left: 10px !important;
::v-deep(>div){
margin-left: 10px;
}
}
}

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

@ -1,38 +1,84 @@
<template>
<el-button
v-for="(item, index) in Butttondata" :key="index"
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>
<div v-for="(item, index) in Butttondata" :key="index">
<el-button
v-show="!item.hide"
:type="item.type"
:color="item.color"
:link="item.link ? item.link : false"
v-hasPermi="[item.hasPermi] || []"
v-if="item.name != 'set'"
@click="buttonBaseClick(item.name, item, $event)"
>
<Icon v-if="item.icon" :icon="item.icon" class="mr-1px" />
{{ 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>
</template>
<script setup>
import { Plus } from '@element-plus/icons-vue'
import { clearButtonBlurHandle } from '@/utils/index'
const props = defineProps({
Butttondata: {
type: Array,
default: () => {
return []
}
},
})
import { Plus } from '@element-plus/icons-vue'
import { clearButtonBlurHandle } from '@/utils/index'
import rowDrop from '@/components/rowDrop/index.vue'
const props = defineProps({
Butttondata: {
type: Array,
default: () => {
return []
}
},
allSchemas: {
type: Object,
default: null
}
})
//
const emit = defineEmits([
'buttonBaseClick',
])
console.log('buttonsRight', props.Butttondata)
//
const emit = defineEmits(['buttonBaseClick', 'updataTableColumns'])
const buttonBaseClick = (val, item, $event) => {
clearButtonBlurHandle($event)//el-button
emit('buttonBaseClick', val, item, $event)
}
const buttonBaseClick = (val, item, $event) => {
clearButtonBlurHandle($event) //el-button
emit('buttonBaseClick', val, item, $event)
}
const popoverVisible = ref(false)
//
const closeRowDrop = () => {
popoverVisible.value = false
}
defineExpose({
popoverVisible
})
//
const updataTableColumns = (val) => {
emit('updataTableColumns', val)
}
</script>

36
src/components/rowDrop/index.vue

@ -1,20 +1,22 @@
<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)">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handlecheckallchange">全部</el-checkbox>
<el-checkbox-group v-model="checkedDataList" @change="handlecheckedchange">
<draggable :list="allData" :force-fallback="true" chosen-class="chosen" animation="300" @end="dragend" @update="dragenter" >
<template #item="{element}">
<div><el-checkbox :key="element" :label="element">{{element}}</el-checkbox></div>
</template>
</draggable>
</el-checkbox-group>
<el-checkbox-group v-model="checkedDataList" @change="handlecheckedchange">
<draggable :list="allData" :force-fallback="true" chosen-class="chosen" animation="300" @end="dragend" @update="dragenter" >
<template #item="{element}">
<div><el-checkbox :key="element" :label="element">{{element}}</el-checkbox></div>
</template>
</draggable>
</el-checkbox-group>
</div>
<template #footer>
<div class="footer">
<!-- <template #footer> -->
<el-button size="small" @click="reset">重置</el-button>
<el-button size="small" @click="closeRowDrop">关闭</el-button>
</template>
</Dialog>
<!-- </template> -->
</div>
<!-- </Dialog> -->
</template>
<script setup lang="ts">
import { ElMessageBox } from 'element-plus'
@ -68,7 +70,7 @@ const reset = () => {
//
const closeRowDrop = () => {
popoverVisible.value = false
emit('closeRowDrop')
}
//
@ -182,7 +184,8 @@ const updataTableColumns = (val) => {
//
const emit = defineEmits([
'updataTableColumns'
'updataTableColumns',
'closeRowDrop'
])
/** 初始化 **/
@ -202,4 +205,11 @@ defineExpose({
// padding: 15px;
// border-top: #eee solid 1px;
// }
.test_wrapper{
max-height: calc(100vh - 350px);
overflow-y: auto;
}
.footer{
margin-top: 10px;
}
</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">
<div class="checkbox">
<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>
</el-radio-group>
</div>
@ -116,9 +116,9 @@
<el-input-number v-model="cur.CeilingQty" :min="cur.FloorQty + 1" class='ml-20px mr-20px' style="width:100px"
controls-position="right" @blur="inputNumberBlur" />
<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" />
<div>EA</div>
<div>{{formData.configuration[1].Value == 'QTY'?'EA':'%'}}</div>
</div>
<div class="button flex">
<div @click="handleAddTable(item.Value)">
@ -248,6 +248,20 @@ const changeSupplierType = (e) => {
}
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) => {
formStrategyCode.value = strategyCode

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

@ -14,6 +14,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
},
{
label: '任务单号',
@ -46,6 +47,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
},
{
label: '到月台代码',
@ -100,7 +102,6 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
@ -112,7 +113,6 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'toLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
@ -252,7 +252,6 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
@ -264,8 +263,10 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
table: {
width: 150
width: 150,
fixed: 'left'
},
isSearch: true,
},
{
label: '业务类型',
@ -335,15 +336,51 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验
export const PurchasereceiptRecordMainRules = reactive({
requestNumber: [required],
supplierCode: [required],
toWarehouseCode: [required],
outTransaction: [required],
inTransaction: [required],
executeTime: [required],
activeDate: [required],
toLocationTypes: [required],
available: [required],
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'change' }
],
toWarehouseCode: [
{ required: true, message: '请选择到仓库代码', trigger: 'change' }
],
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({
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