Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
陈薪名 8 months ago
parent
commit
3534d8fe45
  1. 4
      src/components/Detail/src/Detail.vue
  2. 30
      src/components/Form/src/Form.vue
  3. 2
      src/components/Remarks/src/Remarks.vue
  4. 267
      src/views/qms/basicDataManage/inspectionTemplate/index.vue
  5. 261
      src/views/wms/agvManage/agvLocationrelation/index.vue
  6. 69
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  7. 9
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

4
src/components/Detail/src/Detail.vue

@ -97,9 +97,9 @@
</DetailTable>
</ContentWrap>
<!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'">
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'">
<!-- 附件组件 -->
<Annex v-show="current===tabsList.length-3"
<Annex v-show="tabsList[current].label=='附件'"
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"

30
src/components/Form/src/Form.vue

@ -21,7 +21,7 @@ import { set } from 'lodash-es'
import { FormProps } from './types'
import { Icon } from '@/components/Icon'
import { FormSchema, FormSetPropsType } from '@/types/form'
import { Search } from '@element-plus/icons-vue'
import { Search,CircleClose } from '@element-plus/icons-vue'
const { getPrefixCls } = useDesign()
@ -245,7 +245,18 @@ export default defineComponent({
return (
<>
<ElTooltip placement="top" content={formModel.value[item.field]} >
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} />
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){
formModel.value[item.field] = []
}else{
formModel.value[item.field] = ''
}
}}>
</ElButton>
)
}}/>
</ElTooltip>
<ElButton icon={Search} onClick={()=>{
opensearchTable(
@ -263,7 +274,20 @@ export default defineComponent({
formItemSlotsSearchList[item.field] = () => {
return (
<>
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} />
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){
formModel.value[item.field] = []
}else{
formModel.value[item.field] = ''
}
}}>
</ElButton>
)
}}>
</ElInput>
<ElButton icon={Search} onClick={()=>{
opensearchTable(
item.field, item?.componentProps?.searchField,

2
src/components/Remarks/src/Remarks.vue

@ -1,6 +1,6 @@
<!-- 备注组件 -->
<template>
<div class="annex">
<div class="annex" >
<!-- <div class="title flex items-center">
<div class="title-txt">备注</div>
</div> -->

267
src/views/qms/basicDataManage/inspectionTemplate/index.vue

@ -0,0 +1,267 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="AgvLocationrelation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="AgvLocationrelation.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #reqCode="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.reqCode)">
<span>{{ row.reqCode }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="AgvLocationrelationRules"
:formAllSchemas="AgvLocationrelation.allSchemas"
:apiUpdate="AgvLocationrelationApi.updateAgvLocationrelation"
:apiCreate="AgvLocationrelationApi.createAgvLocationrelation"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="AgvLocationrelation.allSchemas"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/agv-locationrelation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { AgvLocationrelation,AgvLocationrelationRules } from './agvLocationrelation.data'
import * as AgvLocationrelationApi from '@/api/wms/agvLocationrelation'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'AgvLocationrelation' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(AgvLocationrelation.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: AgvLocationrelationApi.getAgvLocationrelationPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:agv-locationrelation:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:agv-locationrelation:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:agv-locationrelation:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:agv-locationrelation:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "update"){
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = true
}
if (item.field == 'positionArea') {
item.componentProps.disabled = true
}
})
}else {
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = false
}
if (item.field == 'positionArea') {
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =AgvLocationrelation.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await AgvLocationrelationApi.createAgvLocationrelation(data)
message.success(t('common.createSuccess'))
} else {
await AgvLocationrelationApi.updateAgvLocationrelation(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAgvLocationrelation')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await AgvLocationrelationApi.deleteAgvLocationrelation(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params)
download.excel(data, 'AGV库位转换.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'AGV库位转换导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await AgvLocationrelationApi.importTemplate()
})
</script>

261
src/views/wms/agvManage/agvLocationrelation/index.vue

@ -1,267 +1,10 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="AgvLocationrelation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
11
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="AgvLocationrelation.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #reqCode="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.reqCode)">
<span>{{ row.reqCode }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="AgvLocationrelationRules"
:formAllSchemas="AgvLocationrelation.allSchemas"
:apiUpdate="AgvLocationrelationApi.updateAgvLocationrelation"
:apiCreate="AgvLocationrelationApi.createAgvLocationrelation"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="AgvLocationrelation.allSchemas"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/agv-locationrelation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { AgvLocationrelation,AgvLocationrelationRules } from './agvLocationrelation.data'
import * as AgvLocationrelationApi from '@/api/wms/agvLocationrelation'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'AgvLocationrelation' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(AgvLocationrelation.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: AgvLocationrelationApi.getAgvLocationrelationPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:agv-locationrelation:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:agv-locationrelation:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:agv-locationrelation:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:agv-locationrelation:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "update"){
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = true
}
if (item.field == 'positionArea') {
item.componentProps.disabled = true
}
})
}else {
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = false
}
if (item.field == 'positionArea') {
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =AgvLocationrelation.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await AgvLocationrelationApi.createAgvLocationrelation(data)
message.success(t('common.createSuccess'))
} else {
await AgvLocationrelationApi.updateAgvLocationrelation(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAgvLocationrelation')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await AgvLocationrelationApi.deleteAgvLocationrelation(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params)
download.excel(data, 'AGV库位转换.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'AGV库位转换导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await AgvLocationrelationApi.importTemplate()
})
</script>

69
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -191,42 +191,42 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
 if (val == 'mainJobExe') { //
let aaa = {
"id": 3,
"requestNumber": "REQ1720240326-0012",
"id": 4,
"requestNumber": "REQ1720240401-0001",
"deliverPlanNumber": "",
"customerDeliverNumber": "CUST20240326-00000012",
"customerCode": "KHV",
"customerDockCode": "YTV4",
"customerDeliverNumber": "CUST20240401-00000001",
"customerCode": "30003432",
"customerDockCode": "916",
"deliverDock": null,
"carrierCode": "",
"transferMode": "",
"vehiclePlateNumber": "",
"fromWarehouseCode": null,
"toWarehouseCode": "CKV",
"requestTime": 1711443936000,
"toWarehouseCode": "",
"requestTime": 1711936069000,
"requestDueTime": null,
"status": "2",
"status": "1",
"expiredTime": null,
"updateTime": 1711443936000,
"updateTime": 1711936069000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityincrement": null,
"departmentCode": "100",
"acceptUserId": "1",
"acceptTime": 1711443941000,
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromAreaTypes": "FG,STOCK_UP",
"fromAreaTypes": "FG,STOCK_UP,SEMI",
"toAreaTypes": "CUST,THIRD_PARTY",
"number": "JOB2420240326-0013",
"number": "JOB2420240401-0001",
"businessType": "Deliver",
"remark": "",
"createTime": 1711443936000,
"createTime": 1711936069000,
"creator": "超级管理员",
"ruleUserId": null,
"fromAreaCodes": "FG",
"toAreaCodes": "CUST,ZTQ",
"fromAreaCodes": "",
"toAreaCodes": "",
"fromDockCode": null,
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
@ -241,44 +241,43 @@ const buttonTableClick = async (val, row) => {
"inInventoryStatuses": "OK",
"outInventoryStatuses": "OK",
"concurrencyStamp": 1,
"useOnTheWayLocation": null,
"subList": [{
"id": 3,
"id": 6,
"soNumber": null,
"soLine": null,
"packingNumber": null,
"batch": "2024021801",
"batch": "20240329",
"inventoryStatus": "OK",
"ownerCode": null,
"containerNumber": null,
"fromLocationCode": "FG",
"toLocationCode": "SFK",
"itemCode": "vvcs-zhj1",
"itemName": "测试物件",
"itemDesc1": "水冷系-散热器",
"itemDesc2": "水冷系-散热器",
"projectCode": "PJ001",
"qty": 11,
"uom": "PC",
"number": "JOB2420240326-0013",
"fromLocationCode": "W70-240-10",
"toLocationCode": "3041",
"itemCode": "399.960-12",
"itemName": "远光内侧反射镜(镀铝)右灯",
"itemDesc1": null,
"itemDesc2": null,
"projectCode": null,
"qty": 1,
"uom": "EA",
"number": "JOB2420240401-0001",
"remark": "",
"createTime": 1711443936000,
"createTime": 1711936070000,
"creator": "超级管理员",
"toPackingNumber": null,
"toContainerNumber": null,
"toBatch": null,
"handleQty": null,
"toInventoryStatus": null,
"updateTime": 1711443936000,
"updateTime": 1711936070000,
"updater": "超级管理员",
"onTheWayLocationCode": "FHZTK",
"onTheWayLocationCode": "914",
recordList: [{
handleQty: 11,
handleQty: 1,
toPackingNumber: null,
toContainerNumber: null,
toBatch: '2024021801',
toBatch: '20240329',
toInventoryStatus: 'OK',
toLocationCode: "SFK",
toLocationCode: "3041",
supplierCode: '31213',
}]
}

9
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -213,15 +213,6 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '发货库区类型',
field: 'deliverType',
sort: 'custom',
dictType: DICT_TYPE.DELIVER_TYPE,
table: {
width: 150
},
},
{
label: '车牌号',
field: 'vehiclePlateNumber',

Loading…
Cancel
Save