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
57c0ff2e59
  1. 37
      src/api/mes/workstation/index.ts
  2. 2
      src/api/wms/itembasic/index.ts
  3. 2
      src/api/wms/itempackage/index.ts
  4. 3
      src/components/workstationBind/index.ts
  5. 81
      src/components/workstationBind/src/Detail.vue
  6. 62
      src/views/mes/workstation/index.vue
  7. 66
      src/views/mes/workstation/workstation.data.ts
  8. 2
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  9. 2
      src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts
  10. 5
      src/views/wms/deliversettlementManage/stockup/stockupMainJob/stockupMainJob.data.ts
  11. 10
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

37
src/api/mes/workstation/index.ts

@ -47,3 +47,40 @@ export const exportWorkstation = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/mes/workstation/get-import-template' })
}
// 查询班组列表
export const getTeamPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/team/senior', data })
} else {
return await request.get({ url: `/wms/team/page`, params })
}
}
export const getEquipmentPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/equipment/senior', data })
} else {
return await request.get({ url: `/mes/equipment/page`, params })
}
}
export const getProcessPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/process/senior', data })
} else {
return await request.get({ url: `/wms/process/page`, params })
}
}
export const getProductionPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/production/senior', data })
} else {
return await request.get({ url: `/wms/production/page`, params })
}
}

2
src/api/wms/itembasic/index.ts

@ -34,7 +34,7 @@ export const getItembasicPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/itembasic/senior', data })
return await request.post({ url: '/wms/itembasic/senior', data })
} else {
return await request.get({ url: `/wms/itembasic/page`, params })
}

2
src/api/wms/itempackage/index.ts

@ -24,7 +24,7 @@ export const getItempackagingPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/itempackage/senior', data })
return await request.post({ url: '/wms/itempackage/senior', data })
} else {
return await request.get({ url: `/wms/itempackage/page`, params })
}

3
src/components/workstationBind/index.ts

@ -1,3 +1,2 @@
import workstationBind from './src/workstationBind.vue'
import detail from './src/Detail.vue'
export { workstationBind,detail }
export {detail }

81
src/components/workstationBind/src/workstationBind.vue → src/components/workstationBind/src/Detail.vue

@ -15,7 +15,6 @@
<ContentWrap>
<!-- 默认单表展现 -->
<Descriptions
v-if="isBasic && !tabsExtend"
:data="detailData"
:schema="allSchemas.detailSchema"
:columns="2"
@ -29,12 +28,12 @@
<!-- 单表切换tabs 展现table -->
<Table
v-if="isBasic && tabsExtend"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
:columns="teamSchemasRef.tableColumns"
:data="teamObjectRef.tableList"
:loading="teamObjectRef.loading"
:pagination="{ total: teamObjectRef.total }"
v-model:pageSize="teamObjectRef.pageSize"
v-model:currentPage="teamObjectRef.currentPage"
>
<template>
<div>1</div>
@ -42,12 +41,12 @@
</Table>
<Table
v-if="!isBasic && fromeWhere != 'Equipment'"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
:columns="teamSchemasRef.tableColumns"
:data="teamObjectRef.tableList"
:loading="teamObjectRef.loading"
:pagination="{ total: teamObjectRef.total }"
v-model:pageSize="teamObjectRef.pageSize"
v-model:currentPage="teamObjectRef.currentPage"
>
<template>
<div>1</div>
@ -55,12 +54,12 @@
</Table>
<Table
v-if="!isBasic && fromeWhere != 'Process'"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
:columns="teamSchemasRef.tableColumns"
:data="teamObjectRef.tableList"
:loading="teamObjectRef.loading"
:pagination="{ total: teamObjectRef.total }"
v-model:pageSize="teamObjectRef.pageSize"
v-model:currentPage="teamObjectRef.currentPage"
>
<template>
<div>1</div>
@ -68,8 +67,8 @@
</Table>
<DetailTable
v-if="!isBasic && fromeWhere == 'Production' && isShowDrawer"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:columns="teamSchemasRef.tableColumns"
:data="teamObjectRef.tableList"
:allList="allList"
:countScopeType="countScopeType"
:key="updateKey"
@ -120,7 +119,7 @@ import TableHead from "@/components/TableHead/src/TableHead.vue";
import ChangeRecord from "@/components/ChangeRecord/src/ChangeRecord.vue";
import {Team} from "@/utils/disposition/formFields";
defineOptions({ name: 'BindDetail' })
defineOptions({ name: 'Detail' })
const message = useMessage() //
const { t } = useI18n() //
@ -144,6 +143,12 @@ const props = defineProps({
required: false,
default: false
},
//
tableAllSchemas: {
type: Array,
required: true,
default: null
},
//
allSchemas: {
type: Object,
@ -265,6 +270,11 @@ const props = defineProps({
type: Boolean,
required: false,
default: true
},
teamSchemas:{
type: Boolean,
required: false,
default: true
}
})
const isShowDrawer = ref(false)
@ -364,7 +374,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
masterParmas.value.masterId = row.id
masterParmas.value.number = row.number
masterParmas.value.status = row.status
tableObjectRef.value.params = {
teamObjectRef.value.params = {
masterId: row.id
}
await getList()
@ -452,18 +462,19 @@ const remarksSubmitScuess = async (remark) => {
const getChangeRecordList = async () => {
changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data)
}
const tableObjectRef = ref()
const tableMethodsRef = ref()
const detailAllSchemasRef = ref()
detailAllSchemasRef.value = props.detailAllSchemas
const teamObjectRef = ref()
const teamMethodsRef = ref()
const teamSchemasRef = ref()
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
detailAllSchemasRef.value = props.detailAllSchemas
teamObjectRef.value = tableObject
teamMethodsRef.value = tableMethods
teamSchemasRef.value = props.teamSchemas
//
const isShowMainButton = (row, val) => {
@ -475,7 +486,7 @@ const isShowMainButton = (row, val) => {
}
//
const { getList } = tableMethodsRef.value
const { getList } = teamMethodsRef.value
//
@ -565,9 +576,9 @@ const searchFormClick = async (searchData) => {
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
}
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
teamObjectRef.value = tableObject
teamMethodsRef.value = tableMethods
teamObjectRef.value.tableList = []
const { getList } = tableMethods
await getList()
updateKey.value += 1
@ -623,8 +634,8 @@ watch(
tableObject.params[item.key] = item.value
})
}
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
teamObjectRef.value = tableObject
teamMethodsRef.value = tableMethods
const { getList } = tableMethods
getList()
}

62
src/views/mes/workstation/index.vue

@ -51,22 +51,34 @@
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Workstation.allSchemas" />
<!-- 绑定 -->
<BindDetail ref="bindDetailRef" :isBasic="true" :allSchemas="Workstation.allSchemas" />
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="Workstation.allSchemas"
:detailAllSchemas="detailAllSchemas"
:detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage"
:tabs="TabsList"
@changeTabs="changeTabs"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { Workstation,WorkstationRules } from './workstation.data'
import {TabsList, Team, Workstation, WorkstationRules} from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation'
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'
import BindDetail from '@/components/workstationBind/src/workstationBind.vue'
import {
PurchasereceiptRecordDetail,
PurchasereceiptRecordDetailRules,
PurchasereceiptRecordMain
} from "@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data";
import {PurchasereceiptRequestTabsList} from "@/utils/disposition/tabsList";
import * as PurchasereceiptRecordDetailApi from "@/api/wms/purchasereceiptRecordDetail";
import {getEquipmentPage, getProcessPage, getProductionPage} from "@/api/mes/workstation";
defineOptions({ name: 'Workstation' })
const message = useMessage() //
@ -136,7 +148,6 @@ const buttonBaseClick = (val, item) => {
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:workstation:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:workstation:delete'}), //
defaultButtons.mainListBindBtn({hasPermi:'wms:workstation:update'}), //
]
// -
@ -145,8 +156,6 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
await handleDelete(row.id)
}else if (val == 'bind') { //
openBindDetail(row,row.name,row.code)
}
}
/** 添加/修改操作 */
@ -179,16 +188,11 @@ const formsSuccess = async (formType,data) => {
getList()
}
/** 详情操作 */
/** 绑定操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation')
}
/** 绑定操作 */
const bindDetailRef = ref()
const openBindDetail = (row: any, titleName: any, titleValue: any) => {
bindDetailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@ -248,5 +252,31 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await WorkstationApi.importTemplate()
})
//
const teamRef = ref()
const { tableObject: teamData, tableMethods: teamMethods } = useTable({
getListApi: WorkstationApi.getTeamPage
})
const { getList:teamList } = teamMethods
const detailAllSchemas = ref(Team.allSchemas)
const apiPage = ref(WorkstationApi.getTeamPage)
const tabeKey = ref("workstationDetail");
// tabs
const changeTabs = (data) =>{
if(data.prop == 'Team'){
console.log(data)
apiPage.value = WorkstationApi.getTeamPage
detailAllSchemas.value = Team.allSchemas
}else if(data.prop == 'Equipment'){
apiPage.value = WorkstationApi.getEquipmentPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}else if(data.prop == 'Process'){
apiPage.value = WorkstationApi.getProcessPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}else if(data.prop == 'Production'){
apiPage.value = WorkstationApi.getProductionPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}
tabeKey.value = data.prop
}
</script>

66
src/views/mes/workstation/workstation.data.ts

@ -6,7 +6,7 @@ export const WorkstationRules = reactive({
code: [required]
})
export const TabsList = [{
label: "组",
label: "组",
prop: 'Team',
},
{
@ -104,3 +104,67 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
}
}
]))
export const Team = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))
export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))
export const Process = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))
export const Production = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))

2
src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts

@ -32,8 +32,6 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}

2
src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts

@ -319,7 +319,7 @@ export const SupplieritemRules = reactive({
],
supplierItemCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
// { validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
// packUnit: [
// { required: true, message: '请选择供应商包装单位', trigger: 'change' }

5
src/views/wms/deliversettlementManage/stockup/stockupMainJob/stockupMainJob.data.ts

@ -284,6 +284,11 @@ export const StockupMainJob = useCrudSchemas(reactive<CrudSchema[]>([
field: 'outInventoryStatuses',
sort: 'custom',
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',

10
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -441,6 +441,7 @@
//
const submitForm = async (formType, data) => {
data.subList = []
let flag = false
for (let item of tableData.value) {
await PurchaseDetailApi.getPurchaseDetailPageCheckData({
number: item.poNumber,
@ -449,13 +450,20 @@
console.log("【要货计划】-每条数据结果",item)
if(res.list[0].type == 'DISCRETE'){//
if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
flag = true;
message.error('要货计划数量不得大于订单数量-已计划数量')
return
}else{
data.subList.push(item) //
}
}else{
data.subList.push(item) //
}
data.subList.push(item) //
})
}
if(flag){
return;
}
if (data.subList.length == tableData.value.length) {
try {
if (formType === 'create') {

Loading…
Cancel
Save