Browse Source

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

master_hella_20240701
ljlong_2630 8 months ago
parent
commit
72687b61ee
  1. 23
      src/api/qms/inspectionPlan/index.ts
  2. 18
      src/api/wms/supplierinvoiceRequestMain/index.ts
  3. 43
      src/components/Detail/src/Detail.vue
  4. 6
      src/utils/dict.ts
  5. 4
      src/views/login/components/LoginForm.vue
  6. 141
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  7. 10
      src/views/qms/basicDataManage/inspectionPlan/index.vue
  8. 92
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  9. 10
      src/views/qms/inspection/inspectionJob/index.vue
  10. 241
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue
  11. 769
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts
  12. 174
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue
  13. 592
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts
  14. 460
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  15. 669
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts
  16. 1
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  17. 1
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  18. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  19. 164
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  20. 207
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  21. 581
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

23
src/api/qms/inspectionPlan/index.ts

@ -1,30 +1,23 @@
import request from '@/config/axios'
// 查询采样过程列表
export const getListByTempleteCode = async (code) => {
return await request.get({ url: `/qms/inspection-process/getListByTempleteCode?code=`+code})
}
// 新增
export const inspectionTemplateCreat = async (data) => {
return await request.post({ url: `/qms/programme-template/create`,data})
export const inspectionPlanCreat = async (data) => {
return await request.post({ url: `/qms/type-template/create`,data})
}
// 编辑
export const inspectionTemplateUpdate = async (data) => {
return await request.put({ url: `/qms/programme-template/update`,data})
export const inspectionPlanUpdate = async (data) => {
return await request.put({ url: `/qms/type-template/update`,data})
}
// 删除
export const inspectionTemplateDelete = async (id) => {
return await request.delete({ url: `/qms/programme-template/delete?id=`+id})
export const inspectionPlanDelete = async (id) => {
return await request.delete({ url: `/qms/type-template/delete?id=`+id})
}
// 列表
export const inspectionTemplatePage = async (params) => {
export const inspectionPlanPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/accountcalendar/senior', data })
} else {
return await request.get({ url: `/qms/programme-template/page`, params })
return await request.get({ url: `/qms/type-template/page`, params })
}
}

18
src/api/wms/supplierinvoiceRequestMain/index.ts

@ -68,14 +68,24 @@ export const cloSupplierinvoiceRequestMain = async (id: number) => {
export const subSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
// 供应商--审批通过供应商发货申请主
export const appSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
// 供应商--驳回供应商发货申请主
export const rejSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id })
}
// 财务--审批通过供应商发货申请主
export const financeappSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/financeApp?id=` + id })
}
// 财务--驳回供应商发货申请主
export const financerejSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/financeRej?id=` + id })
}
// 生成记录
export const genRecordsSupplierinvoiceRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/genRecords?id=` + id })
@ -89,3 +99,7 @@ export const exportSupplierinvoiceRequestMain = async (params) => {
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' })
}

43
src/components/Detail/src/Detail.vue

@ -28,7 +28,7 @@
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!='附件'&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'"> <!-- 列表头部 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!='附件'&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
@ -97,9 +97,15 @@
</DetailTable>
</ContentWrap>
<!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<ContentWrap class="w-[100%]" v-show="annexTableData.some(item=>item.label==tabsList[current].label)||tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-for="(annexItem ,index) in annexTableData" :key="index" v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
@handleAnnexSuccess="updateAnnexTableHandle"
@deleteAnnexSuccess="updateAnnexTableHandle"
:upData="{...remarksData.data,tableName:annexItem.tableName}"
/>
<Annex v-show="tabsList[current].label=='附件'"
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@ -176,6 +182,12 @@ const props = defineProps({
required: true,
default: null
},
//tab
annexTable: {
type: Array,
required: false,
default: ()=>[]
},
//
isBasic: {
type: Boolean,
@ -334,7 +346,7 @@ if (props.isBasic == true) {
}
}
const otherList = [{
const otherList = [...props.annexTable,{
label:'附件',
prop:'Annex'
},{
@ -373,6 +385,8 @@ const remarkHeight = computed(() => {
const annexData = reactive({
annexList: []
})
//
const annexTableData = ref<Array<any>>([])
//
const remarksData = reactive({
@ -394,6 +408,23 @@ const getFileList = async () => {
detailLoading.value = false
}
}
//
const getAnnexFileList = async () => {
props.annexTable?.forEach(async (item) => {
let requstData = {...remarksData.data,tableName: item?.tableName}
const annexList = await FileApi.getFileList(requstData)
const annexData = annexTableData.value.find(annex=>annex.label === item.label)
if(annexData){
annexData.annexList = annexList
}else{
annexTableData.value.push({
label: item.label,
tableName: item?.tableName || '',
annexList
})
}
})
}
/** 添加附件 */
const handleAnnexSuccess = () => {
getFileList()
@ -404,6 +435,11 @@ const deleteAnnexSuccess = async () => {
getFileList()
getChangeRecordList()
}
/** 追加的附件 */
const updateAnnexTableHandle = () => {
getAnnexFileList()
getChangeRecordList()
}
// Tabs
const current = ref(0)
@ -481,6 +517,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
detailData.value = row
getRemarkList()
getFileList()
getAnnexFileList()
getChangeRecordList()
//
let detailButtonFilter: any = []

6
src/utils/dict.ts

@ -293,7 +293,9 @@ export enum DICT_TYPE {
INSPECTION_CHARACTERISTICS_FEATURE_TYPE = "inspection_characteristics_feature_type", // 特征类型
INSPECTION_CHARACTERISTICS_RESULT_ENTRY = "inspection_characteristics_result_entry", // 结果录入方式
INSPECTION_SEVERITY = 'inspection_severity',//检验严重性
SPLIT_RULES = "split_rules", // 拆分规则
INSPECTION_LEVEL = "inspection_level", // 检验水平字典
BASIC_AQL = "basic_aql", // aql
// ========== 业务 - mes -gaojs ==========
QUALIFY_STATUS = 'qualify_status',//质检状态
@ -304,6 +306,6 @@ export enum DICT_TYPE {
REWORK_TYPE='rework_type',//工作类型:返工登记、返修登记
REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成
REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件
SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态
}

4
src/views/login/components/LoginForm.vue

@ -100,7 +100,7 @@ const iconLock = useIcon({ icon: 'ep:lock' })
const formLogin = ref()
const { validForm } = useFormValid(formLogin)
const { setLoginState, getLoginState } = useLoginState()
const { currentRoute, push } = useRouter()
const { currentRoute, push , replace} = useRouter()
const permissionStore = usePermissionStore()
const redirect = ref<string>('')
const loginLoading = ref(false)
@ -215,7 +215,7 @@ const handleLogin = async (params) => {
window.location.href = window.location.href.replace('/login?redirect=', '')
} else {
console.log(redirect.value)
push({ path: redirect.value || permissionStore.addRouters[0].path })
replace({ path: redirect.value || permissionStore.addRouters[0].path })
}
//
const { wsCache } = useCache()

141
src/views/qms/basicDataManage/inspectionPlan/addForm.vue

@ -7,9 +7,8 @@
:vLoading="formLoading"
>
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px">
<!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> -->
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row>
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="code">
<el-input v-model="data.code" placeholder="根据系统生成" :disabled="true" />
@ -25,6 +24,103 @@
<el-input v-model="data.version" placeholder="请填写版本" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验类型编码" prop="testTypeCode" >
<div style="display: flex; width: 100%">
<el-input
v-model="data.testTypeCode"
disabled
placeholder="请选择检验类型编码"
/>
<el-button
type="info"
plain
style="width: 40px"
@click="opensearchTable('testTypeCode', null,'检验类型',SamplingProcess.allSchemas,SamplingProcessApi.getSamplingProcessPage,null,false,null,item)"
><Icon icon="ep:search"/>
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验模板编码" prop="programmeTemplateCode" >
<div style="display: flex; width: 100%">
<el-input
v-model="data.testTypeCode"
disabled
placeholder="请选择检验模板编码"
/>
<el-button
type="info"
plain
style="width: 40px"
@click="opensearchTable('programmeTemplateCode', null,'检验类型',SamplingProcess.allSchemas,SamplingProcessApigetSamplingProcessPage,null,false,null,item)"
><Icon icon="ep:search"/>
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="拆分规则" prop="splitRule">
<el-select v-model="data.splitRule" placeholder="请选择拆分规则" >
<el-option
v-for="dict in getStrDictOptions( DICT_TYPE.SPLIT_RULES )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="aql" prop="aql">
<el-select v-model="data.aql" placeholder="请选择aql" >
<el-option
v-for="dict in getStrDictOptions( DICT_TYPE.BASIC_AQL )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验水平" prop="inspectionLevel">
<el-select v-model="data.inspectionLevel" placeholder="请选择检验水平" >
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_LEVEL )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="生效时间" prop="effectiveDate">
<el-date-picker
v-model="data.effectiveDate"
type="datetime"
placeholder="请选择生效时间"
style="width:100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="失效时间" prop="expirationDate">
<el-date-picker
v-model="data.expirationDate"
type="datetime"
placeholder="请选择失效时间"
style="width:100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否可用" prop="available">
<el-switch v-model="data.available" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs
@ -43,13 +139,6 @@
:name="item.name"
>
<div class="small-title">检验工序</div>
<!-- <Form
:ref="`formRefProcess`+index"
:schema="formAllSchemasProcess"
:is-col="true"
labelWidth="150px"
:rules="rules"
/> -->
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
@ -483,6 +572,7 @@ const data = ref({
code: '',
description: '',
version: '',
available:true,
process: []
})
const isYesList = [
@ -576,10 +666,28 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type
if (row) {
data.value = row
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
//
if(item.quantifyIsCapping){
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
}else{
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if(item.quantifyIsLowlimit){
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
}else{
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if(item.quantifyIsTarget){
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
}else{
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
})
data.value.process = list
} else {
@ -587,6 +695,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
code: '',
description: '',
version: '',
available:true,
process: []
}
}
@ -645,6 +754,7 @@ const buttonBaseClick1 = (val) => {
featureType: '',
quantifyIsCapping: '',
quantifyIsLowlimit: '',
quantifyIsTarget: '',
quantifyTarget: '',
quantifyCapping: '',
quantifyLowlimit: '',
@ -691,6 +801,7 @@ const validateForm = (formRef) => {
return false
})
}
const submitForm = async () => {
try {
const validateForm1 = await validateForm(formProcessRef.value)
@ -706,6 +817,13 @@ const submitForm = async () => {
message.error(`模板中有检验工序和检验特性未填写完全`)
return;
}
const arr = data.value.process.filter(item=>(!item.inspectionCharacteristicsBaseVO.quantifyIsCapping&&!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit&&!item.inspectionCharacteristicsBaseVO.quantifyIsTarget&&item.inspectionCharacteristicsBaseVO.featureType == 0))
console.log(arr)
if(arr&&arr.length>0){
const str = arr.map(item=>item.description).join(',')
message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`)
return;
}
if (formType.value == 'create') {
//
emit('submitForm', formType.value, data)
@ -730,6 +848,11 @@ if (props.footButttondata) {
//
const changeFeatureType = (e) => {
console.log(e)
// if (e) {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true
// } else {
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false
// }
}
const searchTableRef = ref()
const opensearchTable = (

10
src/views/qms/basicDataManage/inspectionPlan/index.vue

@ -66,7 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionProcessPageApi from '@/api/qms/inspectionPlan'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
defineOptions({ name: 'AgvLocationrelation' })
@ -84,7 +84,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: InspectionProcessPageApi.inspectionTemplatePage //
getListApi: InspectionPlanApi.inspectionPlanPage //
})
//
@ -149,10 +149,10 @@ const openForm = (type: string, row?: any) => {
const submitForm = async (formType,data) => {
console.log(data.value)
if (formType === 'create') {
await InspectionProcessPageApi.inspectionTemplateCreat(data.value)
await InspectionPlanApi.inspectionPlanCreat(data.value)
message.success(t('common.createSuccess'))
} else {
await InspectionProcessPageApi.inspectionTemplateUpdate(data.value)
await InspectionPlanApi.inspectionPlanUpdate(data.value)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
@ -171,7 +171,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await InspectionProcessPageApi.inspectionTemplateDelete(id)
await InspectionPlanApi.inspectionPlanDelete(id)
message.success(t('common.delSuccess'))
//
await getList()

92
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -8,7 +8,7 @@
>
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px">
<!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> -->
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef" gutter="20">
<el-row>
<el-col :span="12">
<el-form-item label="编码" prop="code">
@ -125,8 +125,14 @@
null,
'检验方法',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
InspectionMethodApi.getInspectionMethodPage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -159,7 +165,13 @@
'采样过程编码',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -191,8 +203,14 @@
null,
'动态修改规则编码',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
DynamicRuleApi.getDynamicRulePage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -266,7 +284,9 @@
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-select
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" @change="changeIsCapping"/>
<!-- <el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping"
placeholder="请选择是否设定上限"
@change="changeIsCapping"
@ -277,7 +297,7 @@
:label="item.label"
:value="item.value"
/>
</el-select>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
@ -295,7 +315,8 @@
label="是否设定下限"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-select
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" @change="changeLowlimit"/>
<!-- <el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit"
placeholder="请选择是否设定下限"
@change="changeLowlimit"
@ -306,7 +327,7 @@
:label="item.label"
:value="item.value"
/>
</el-select>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
@ -324,7 +345,8 @@
label="是否设定目标值"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-select
<el-switch v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" @change="changeIsTarget"/>
<!-- <el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget"
placeholder="请选择是否设定目标值"
@change="changeIsTarget"
@ -335,7 +357,7 @@
:label="item.label"
:value="item.value"
/>
</el-select>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
@ -388,8 +410,14 @@
null,
'选择集编码',
SamplingProcess.allSchemas,
SamplingProcessApi.getSamplingProcessPage,
null,
SelectedSetApi.getSelectedSetPage,
[
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
false,
null,
item
@ -434,7 +462,10 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { SearchTable } from '@/components/SearchTable'
import { SamplingProcess } from '@/views/qms/samplingProcess/samplingProcess.data'
import * as SamplingProcessApi from '@/api/qms/samplingProcess'
import * as SamplingProcessApi from '@/api/qms/samplingProcess'//
import * as InspectionMethodApi from '@/api/qms/inspectionMethod'//
import * as DynamicRuleApi from '@/api/qms/dynamicRule'//
import * as SelectedSetApi from '@/api/qms/selectedSet'//
const message = useMessage() //
const props = defineProps({
@ -582,22 +613,21 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
editableTabsValue.value = index + 1
item.name = index + 1
//
if(item.quantifyIsCapping){
if (item.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
}else{
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if(item.quantifyIsLowlimit){
if (item.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
}else{
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if(item.quantifyIsTarget){
if (item.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
}else{
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
})
data.value.process = list
} else {
@ -718,20 +748,26 @@ const submitForm = async () => {
await formMainRef.value.validate()
if (!data.value.process || data.value.process.length == 0) {
message.error(`请添加工序`)
return;
return
}
const bol1 = await validateForm(formProcessRef.value)
const bol2 = await validateForm(formFeaturesRef.value)
if (!bol1 || !bol2) {
message.error(`模板中有检验工序和检验特性未填写完全`)
return;
return
}
const arr = data.value.process.filter(item=>(!item.inspectionCharacteristicsBaseVO.quantifyIsCapping&&!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit&&!item.inspectionCharacteristicsBaseVO.quantifyIsTarget&&item.inspectionCharacteristicsBaseVO.featureType == 0))
const arr = data.value.process.filter(
(item) =>
!item.inspectionCharacteristicsBaseVO.quantifyIsCapping &&
!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit &&
!item.inspectionCharacteristicsBaseVO.quantifyIsTarget &&
item.inspectionCharacteristicsBaseVO.featureType == 0
)
console.log(arr)
if(arr&&arr.length>0){
const str = arr.map(item=>item.description).join(',')
if (arr && arr.length > 0) {
const str = arr.map((item) => item.description).join(',')
message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`)
return;
return
}
if (formType.value == 'create') {
//

10
src/views/qms/inspection/inspectionJob/index.vue

@ -78,11 +78,11 @@
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['itemNumber'] = val[0]['number']
row['itemName'] = val[0]['name']
row['uom'] = val[0]['uom']
row['isRadeIn'] = val[0]['isRadeIn']
row['available'] = val[0]['available']
// row['itemNumber'] = val[0]['number']
// row['itemName'] = val[0]['name']
// row['uom'] = val[0]['uom']
// row['isRadeIn'] = val[0]['isRadeIn']
// row['available'] = val[0]['available']
} else {
const setV = {}
setV[formField] = val[0][searchField]

241
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue

@ -0,0 +1,241 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="UnplannedissueJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="UnplannedissueJobMain.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 #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="UnplannedissueJobMainRules"
:formAllSchemas="UnplannedissueJobMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="UnplannedissueJobDetail.allSchemas"
:tableFormRules="UnplannedissueJobDetailRules"
:apiUpdate="UnplannedissueJobMainApi.updateUnplannedissueJobMain"
:apiCreate="UnplannedissueJobMainApi.createUnplannedissueJobMain"
:isBusiness="true"
@searchTableSuccess="searchTableSuccess"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="UnplannedissueJobMain.allSchemas"
:detailAllSchemas="UnplannedissueJobDetail.allSchemas"
:detailAllSchemasRules="UnplannedissueJobDetailRules"
:searchTableParams="searchTableParams"
:apiPage="UnplannedissueJobDetailApi.getUnplannedissueJobDetailPage"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { UnplannedissueJobMain,UnplannedissueJobMainRules,UnplannedissueJobDetail,UnplannedissueJobDetailRules } from './sparepartsrequisitionJobMain.data'
import * as UnplannedissueJobMainApi from '@/api/wms/unplannedissueJobMain'
import * as UnplannedissueJobDetailApi from '@/api/wms/unplannedissueJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
//
defineOptions({ name: 'UnplannedissueJobMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(UnplannedissueJobMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: UnplannedissueJobMainApi.getUnplannedissueJobMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedissue-job-main: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 == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
}
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'jobUnplannedissueMain')
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await UnplannedissueJobMainApi.exportUnplannedissueJobMain(tableObject.params)
download.excel(data, '计划外出库任务主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

769
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/sparepartsrequisitionJobMain.data.ts

@ -0,0 +1,769 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/**
* @returns {Array}
*/
export const UnplannedissueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isSearch: true,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '要求截止时间',
field: 'requestDueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '过期时间',
field: 'expiredTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '状态',
// field: 'jobStageStatus',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '优先级增量',
field: 'priorityIncrement',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '自动完成',
field: 'autoComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许修改库位',
field: 'allowModifyLocation',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许修改数量',
field: 'allowModifyQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许大于推荐数量',
field: 'allowBiggerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许小于推荐数量',
field: 'allowSmallerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许修改库存状态',
field: 'allowModifyInventoryStatus',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许连续扫描',
field: 'allowContinuousScanning',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许部分完成',
field: 'allowPartialComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许修改批次',
field: 'allowModifyBatch',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '允许修改箱码',
field: 'allowModifyPackingNumber',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '承接时间',
field: 'acceptTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '承接人',
field: 'acceptUserId',
sort: 'custom',
table: {
width: 150
},
},
{
label: '完成时间',
field: 'completeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '完成人',
field: 'completeUserId',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 120,
fixed: 'right'
},
}
]))
//表单校验
export const UnplannedissueJobMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
fromWarehouseCode: [
{ required: true, message: '请选择仓库代码', trigger: 'change' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
fromAreaCodes: [
{ required: true, message: '请选择从库区代码范围', trigger: 'change' }
],
requestTime: [
{ required: true, message: '请输入申请时间', trigger: 'change' }
],
requestDueTime: [
{ required: true, message: '请输入要求截止时间', trigger: 'change' }
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],
// jobStageStatus: [
// { required: true, message: '请选择阶段状态', trigger: 'change' }
// ],
priority: [
{ required: true, message: '请输入优先级', trigger: 'blur' }
],
priorityIncrement: [
{ required: true, message: '请输入优先级增量', trigger: 'blur' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
userPositionCode: [
{ required: true, message: '请输入岗位', trigger: 'blur' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const UnplannedissueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '原因',
field: 'reason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
]))
//表单校验
export const UnplannedissueJobDetailRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})

174
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue

@ -0,0 +1,174 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="UnplannedissueRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="UnplannedissueRecordMain.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 #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="UnplannedissueRecordMainRules"
:formAllSchemas="UnplannedissueRecordMain.allSchemas"
:tableAllSchemas="UnplannedissueRecordDetail.allSchemas"
:tableFormRules="UnplannedissueRecordDetailRules"
:isBusiness="true"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="UnplannedissueRecordMain.allSchemas"
:detailAllSchemas="UnplannedissueRecordDetail.allSchemas"
:detailAllSchemasRules="UnplannedissueRecordDetailRules"
:apiPage="UnplannedissueRecordDetailApi.getUnplannedissueRecordDetailPage"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { UnplannedissueRecordMain,UnplannedissueRecordMainRules,UnplannedissueRecordDetail,UnplannedissueRecordDetailRules } from './sparepartsrequisitionRecordMain.data'
import * as UnplannedissueRecordMainApi from '@/api/wms/unplannedissueRecordMain'
import * as UnplannedissueRecordDetailApi from '@/api/wms/unplannedissueRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
//
defineOptions({ name: 'UnplannedissueRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(UnplannedissueRecordMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: UnplannedissueRecordMainApi.getUnplannedissueRecordMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedissue-record-main: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 == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = (row) => {
return []
}
// -
const buttonTableClick = async (val, row) => {
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'recordUnplannedissueMain')
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await UnplannedissueRecordMainApi.exportUnplannedissueRecordMain(tableObject.params)
download.excel(data, '计划外出库记录主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>

592
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/sparepartsrequisitionRecordMain.data.ts

@ -0,0 +1,592 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/**
* @returns {Array}
*/
export const UnplannedissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isSearch: true
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: true
},
{
label: '任务单号',
field: 'jobNumber',
sort: 'custom',
table: {
width: 180
},
isSearch: true
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '执行时间',
field: 'executeTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '生效日期',
field: 'activeDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从月台代码',
field: 'fromDockCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
]))
//表单校验
export const UnplannedissueRecordMainRules = reactive({
requestNumber: [
{ required: true, message: '请选择申请单号', trigger: 'change' }
],
fromWarehouseCode: [
{ required: true, message: '请选择从仓库代码', trigger: 'change' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
fromAreaCodes: [
{ 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: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const UnplannedissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原因',
field: 'reason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位组代码',
field: 'fromLocationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库区代码',
field: 'fromAreaCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '任务明细ID',
// field: 'jobDetailId',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// table: {
// width: 150
// },
// },
]))
//表单校验
export const UnplannedissueRecordDetailRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' }
],
fromLocationGroupCode: [
{ required: true, message: '请选择从库位组代码', trigger: 'change' }
],
fromAreaCode: [
{ required: true, message: '请选择从库区代码', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})

460
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue

@ -0,0 +1,460 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="UnplannedissueRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="UnplannedissueRequestMain.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 #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="UnplannedissueRequestMainRules"
:formAllSchemas="UnplannedissueRequestMain.allSchemas"
:tableAllSchemas="UnplannedissueRequestDetail.allSchemas"
:tableFormRules="UnplannedissueRequestDetailRules"
:tableData="tableData"
:apiUpdate="UnplannedissueRequestMainApi.updateUnplannedissueRequestMain"
:apiCreate="UnplannedissueRequestMainApi.createUnplannedissueRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="UnplannedissueRequestMain.allSchemas"
:detailAllSchemas="UnplannedissueRequestDetail.allSchemas"
:detailAllSchemasRules="UnplannedissueRequestDetailRules"
:apiCreate="UnplannedissueRequestDetailApi.createUnplannedissueRequestDetail"
:apiUpdate="UnplannedissueRequestDetailApi.updateUnplannedissueRequestDetail"
:apiPage="UnplannedissueRequestDetailApi.getUnplannedissueRequestDetailPage"
:apiDelete="UnplannedissueRequestDetailApi.deleteUnplannedissueRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
@onBlur="onBlur"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/unplannedissue-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { UnplannedissueRequestMain,UnplannedissueRequestMainRules,UnplannedissueRequestDetail,UnplannedissueRequestDetailRules } from './sparepartsrequisitionRequestMain.data'
import * as UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMain'
import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'UnplannedissueRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(UnplannedissueRequestMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['packingNumber'] = val[0]['packingNumber']
setV['containerNumber'] = val[0]['containerNumber']
setV['batch'] = val[0]['batch']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['fromLocationCode'] = val[0]['locationCode']
setV['itemCode'] = val[0]['itemCode']
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: UnplannedissueRequestMainApi.getUnplannedissueRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedissue-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedissue-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedissue-request-main: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') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedissue-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedissue-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedissue-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedissue-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedissue-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedissue-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
await message.confirm(t('common.confirmHandle'))
tableObject.loading = true
await UnplannedissueRequestMainApi.handleUnplannedissueRequestMain(id)
message.success(t('common.handleSuccess'))
tableObject.loading = false
await getList()
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
await message.confirm(t('common.confirmAgree'))
tableObject.loading = true
await UnplannedissueRequestMainApi.agreeUnplannedissueRequestMain(id)
message.success(t('common.agreeSuccess'))
tableObject.loading = false
await getList()
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
await message.confirm(t('common.confirmRefused'))
tableObject.loading = true
await UnplannedissueRequestMainApi.refusedUnplannedissueRequestMain(id)
message.success(t('common.refusedSuccess'))
tableObject.loading = false
await getList()
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
await message.confirm(t('common.confirmSubmit'))
tableObject.loading = true
await UnplannedissueRequestMainApi.submitUnplannedissueRequestMain(id)
message.success(t('common.submitSuccess'))
tableObject.loading = false
await getList()
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
await message.confirm(t('common.confirmColse'))
tableObject.loading = true
await UnplannedissueRequestMainApi.closeUnplannedissueRequestMain(id)
message.success(t('common.closeSuccess'))
tableObject.loading = false
await getList()
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
await message.confirm(t('common.confirmReAdd'))
tableObject.loading = true
await UnplannedissueRequestMainApi.reAddUnplannedissueRequestMain(id)
message.success(t('common.reAddSuccess'))
tableObject.loading = false
await getList()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'requestUnplannedissueMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
tableObject.loading = true
//
await UnplannedissueRequestMainApi.deleteUnplannedissueRequestMain(id)
message.success(t('common.delSuccess'))
tableObject.loading = false
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params)
download.excel(data, '计划外出库申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
UnplannedissueRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
console.log("【计划外出库子列表】",data.subList)
if(data.subList.length == 0){
message.warning("请添加子列表数据")
return;
}
let flag = false;
data.subList.forEach((item) => {
if(item.qty == 0){
message.warning("数量不能为0")
flag = true;
return;
}
})
if(flag){
formRef.value.formLoading = false
return
}
await UnplannedissueRequestMainApi.createUnplannedissueRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await UnplannedissueRequestMainApi.updateUnplannedissueRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
const onBlur = (field, e) => {
if (field == 'reason') {
detailRef.value.formRef.formRef.formModel[field] = e.target.value
}
}
const tableFormSelectOnBlur = (field, val, row, index) => {
if (field == 'reason') {
tableData.value[index][field] = val.target.value
}
}
// /
const detailValidate = (data) => {
let tag = false;
if(data.qty <= 0){
message.warning('数量必须大于0')
tag = false;
return tag;
}else {
tag = true;
return tag;
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '计划外出库申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await UnplannedissueRequestMainApi.importTemplate()
})
</script>

669
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/sparepartsrequisitionRequestMain.data.ts

@ -0,0 +1,669 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'UnplannedDeliverRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept]
/**
* @returns {Array}
*/
export const UnplannedissueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isForm: false,
isSearch: true,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '截止时间',
field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
isForm: false,
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
isForm: false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
form: {
value: 'UnplannedDeliver',
componentProps: {
disabled: true
}
},
isForm: false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userDeptArray.find((account) => account.id == cellValue)?.name
},
form: {
value: userDept.id,
component: 'Select',
api: () => userDeptArray,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
}
}
}
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoAgree,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoExecute,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm: false,
isTable: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.directCreateRecord,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
}
]))
//表单校验
export const UnplannedissueRequestMainRules = reactive({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
/**
* @returns {Array}
*/
export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.getBalancePage
}
}
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '原因',
field: 'reason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
]))
//表单校验
export const UnplannedissueRequestDetailRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
containerNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})

1
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -533,6 +533,7 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.type = 'predict'
data.subList = tableData.value //
if(data.subList.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0')

1
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -532,6 +532,7 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.type = 'assemble'
data.subList = tableData.value //
if(data.subList.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0')

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -818,7 +818,7 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const PurchaseDetailRules = reactive({
lineNumber: [
{ required: true, message: '请输入行号', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
// { max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
packQty: [
{ required: true, message: '请输入包装数量', trigger: 'blur' }

164
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -34,8 +34,63 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true
},
{
label: '调增金额',
field: 'adjustAmount',
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '税率',
field: 'taxRate',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '税额',
field: 'taxAmount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '税后金额',
field: 'afterTaxAmount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '索赔金额',
field: 'claimAmount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '折扣金额',
field: 'discountAmount',
sort: 'custom',
table: {
width: 150
@ -44,6 +99,48 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber',
}
},
{
label: '调整税额',
field: 'adjustingTaxAmount',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '金税票号',
field: 'goldenTaxInvoiceNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '快递单号',
field: 'expressTrackingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '发票时间',
field: 'invoiceTime',
isTable: true,
formatter: dateFormatter,
deatil: {
dateFormatter: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
},
{
label: '业务类型',
field:'businessType',
@ -226,16 +323,16 @@ export const SupplierinvoiceRecordMainRules = reactive({
*/
export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '收货单号',
field: 'recordNumber',
label: '项目编号',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '批次',
field: 'batch',
label: '单据类型',
field: 'billType',
sort: 'custom',
table: {
width: 150
@ -265,6 +362,22 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 180
},
},
{
label: '发货单号',
field: 'asnBillNum',
sort: 'custom',
table: {
width: 180
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 180
},
},
{
label: '物料代码',
field: 'itemCode',
@ -274,19 +387,16 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
},
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
label: '货币',
field: 'currency',
sort: 'custom',
table: {
width: 150
@ -304,8 +414,32 @@ export const SupplierinvoiceRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
{
label: '金额',
field: 'amount',
label: '采购价格',
field: 'purchasePrice',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '收货日期',
field: 'deliveryDate',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
},
{
label: '开票数量',
field: 'invoicableQuantity',
sort: 'custom',
table: {
width: 150

207
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -35,6 +35,8 @@
<BasicForm
ref="formRef"
@success="getList"
:isOpenSearchTable="true"
:indexTableColumn="1"
:rules="SupplierinvoiceRequestMainRules"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas"
:searchTableParams="searchTableParams"
@ -53,6 +55,19 @@
<!-- 详情 -->
<Detail
ref="detailRef"
:annexTable="[{
label: '合同附件',
prop: 'Annex',
tableName:'contract'
},{
label: '电子发票附件',
prop: 'Annex',
tableName:'invoice'
},{
label: '货运单附件',
prop: 'Annex',
tableName:'waybill'
}]"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
@ -65,6 +80,17 @@
:Echo="Echo"
/>
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/wms/supplierinvoice-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
</template>
<script setup lang="ts">
@ -110,59 +136,32 @@
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
val.forEach(item=>{
const newRow = {...row}
newRow[formField] = item[searchField]
if (formField == 'poLine') {
row['poLine'] = val[0]['poLine']
row['itemCode'] = val[0]['itemCode']
row['ownerCode'] = val[0]['ownerCode']
row['batch'] = val[0]['batch']
row['singlePrice'] = val[0]['singlePrice']
row['qty'] = val[0]['qty']
row['amount'] = val[0]['amount']
}
newRow['poNumber'] = item['poNumber']
newRow['poLine'] = item['poLine']
newRow['tax'] =item['tax']
newRow['projectCode'] = item['projectCode']
newRow['billType'] = item['billType']
newRow['recvBillNum'] = item['recvBillNum']
newRow['asnBillNum'] = item['asnBillNum']
newRow['supplierCode'] = item['supplierCode']
newRow['purchasePrice'] = item['purchasePrice']
newRow['invoicableQuantity'] = item['invoicableQuantity']
newRow['itemCode'] = item['itemCode']
}
tableData.value.push(newRow)
})
} else {
console.log(searchFormRef.formModel);
const setV = {}
if(formField == 'recvBillNum'){
setV['recvBillNum'] = val[0]['number']
setV['asnBillNum'] = val[0]['asnNumber']
let params = {
'billType':searchFormRef.formModel.billType,
'recordNumber':val[0]['number']
}
let orderNoFlag = false;
SupplierinvoiceRequestDetailApi.getPoNumber(params).then(res =>{
console.log("返回结果:",res)
if(res.length == 0){
orderNoFlag = true
return
}
let options = [];
for(let i=0;i<res.length;i++){
let option = {
label:res[i],
value:res[i]
}
options.push(option)
}
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(item => {
if (item.field == 'poBillNum') {
item.componentProps.options = options
}
})
})
if(orderNoFlag){
message.error("选择的记录单号没有订单")
return;
}
}
setV[formField] = val[0][searchField]
searchFormRef.setValues(setV)
}
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
@ -175,7 +174,8 @@
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierinvoice-request-main:create' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierinvoice-request-main:export' }), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -223,28 +223,68 @@
// -
const butttondata = (row) => {
return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['1',, '2','4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1'])}), //
//
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
label: '采购审批通过',
name: 'purchase_mainPlanSub',
hide: isShowMainButton(row, ['2','7']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},{
label: '采购驳回',
name: 'purchase_mainPlanTur',
hide: isShowMainButton(row, ['2','7']),
type: 'danger',
color: '',
link: true, //
hasPermi: ''
},
{
label: '财务审批通过',
name: 'finance_mainPlanSub',
hide: isShowMainButton(row, ['4']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},{
label: '财务驳回',
name: 'finance_mainPlanTur',
hide: isShowMainButton(row, ['4']),
type: 'danger',
color: '',
link: true, //
hasPermi: ''
},
// defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
//defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','6'])}), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2','4']) }), //
//
// {
// label: '',
// name: 'genRecords',
// hide: isShowMainButton(row, ['3']),
// type: 'primary',
// icon: '',
// color: '',
// hasPermi: '',
// link: true, //
// },
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-request-main:delete'}), //
]
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
// -
const buttonTableClick = async (val, row) => {
@ -254,10 +294,14 @@
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
} else if (val == 'purchase_mainPlanSub') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
} else if (val == 'purchase_mainPlanTur') { //
handleTur(row.id)
} else if(val == 'finance_mainPlanSub'){ //
handleFinanceApp(row.id)
} else if(val == 'finance_mainPlanTur'){ //
handleFinaceTur(row.id)
} else if (val == 'genRecords') { //
genRecords(row.id)
} else if (val == 'edit') { //
@ -369,6 +413,24 @@
}
}
/** 审批通过按钮操作 */
const handleFinanceApp = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
tableObject.loading = true
//
await SupplierinvoiceRequestMainApi.financeappSupplierinvoiceRequestMain(id)
message.success(t('审批通过成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => {
try {
@ -386,6 +448,23 @@
}
}
/** 驳回按钮操作 */
const handleFinaceTur = async (id : number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
tableObject.loading = true
//
await SupplierinvoiceRequestMainApi.financerejSupplierinvoiceRequestMain(id)
message.success(t('驳回成功!'))
tableObject.loading = false
//
await getList()
} catch { }finally{
tableObject.loading = false
}
}
/** 处理按钮操作 */
const genRecords = async (id : number) => {
try {
@ -456,6 +535,17 @@
}
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发货申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
@ -468,5 +558,6 @@
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
</script>

581
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -5,7 +5,6 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su
const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -27,47 +26,30 @@ const requestsettingData = data?.list[0] || {}
const userDeptArray:any = [userDept]
export const PurchaseReceiptOrReturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
/**
* @returns {Array} 退
*/
export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number'
label: '项目编码',
field: 'projectCode'
},
{
label: '供应商代码',
field: 'supplierCode'
label: '单据类型',
field: 'billType'
},
{
label: '发货单号',
field: 'asnNumber'
label: '单号',
field: 'recvBillNum'
},
{
label: '备注',
field: 'remark',
label: '发货单号',
field: 'asnBillNum'
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTableForm: false,
isForm: false
label: '供应商代码',
field: 'supplierCode'
},
{
label: '创建者',
field: 'creator',
isTableForm: false,
isForm: false
}
]))
/**
* @returns {Array} 退
*/
export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单号',
field: 'poNumber'
@ -77,41 +59,16 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudS
field: 'poLine'
},
{
label: '物料代码',
field: 'itemCode'
},
{
label: '货主代码',
field: 'ownerCode'
},
{
label: '批次',
field: 'batch'
},
{
label: '数量',
field: 'qty',
form: {
component: 'InputNumber',
}
},
{
label: '单价',
field: 'singlePrice',
form: {
component: 'InputNumber',
}
label: '采购价格',
field: 'purchasePrice'
},
{
label: '金额',
field: 'amount',
form: {
component: 'InputNumber',
}
label: '可开票数量',
field: 'invoicableQuantity'
},
{
label: '备注',
field: 'remark',
label: '物料代码',
field: 'itemCode'
},
{
label: '创建时间',
@ -123,12 +80,6 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudS
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
isTableForm: false,
isForm: false
}
]))
@ -169,130 +120,173 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
},
{
label: '单据类型',
field: 'billType',
dictType: DICT_TYPE.BILL_TYPE,
label: '状态',
field: 'status',
dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '记录单号',
field: 'recvBillNum',
sort: 'custom',
label: '金额',
field: 'amount',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
component: 'InputNumber',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '单号信息', // 查询弹窗标题
searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
key: 'billType',
value: 'billType',
message: '请填写单据类型!',
isMainValue: true
}]
label: '税率',
field: 'taxRate',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
key: 'billType',
value: 'billType',
message: '请填写单据类型!',
isMainValue: true
}]
label: '税额',
field: 'taxAmount',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
label: '发货单号',
field: 'asnBillNum',
label: '税后金额',
field: 'afterTaxAmount',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true
min: 0,
precision: 6,
}
},
tableForm: {
disabled: true
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
label: '订单号',
field: 'poBillNum',
sort: 'custom',
label: '索赔金额',
field: 'claimAmount',
table: {
width: 150
},
form: {
component: 'Select',
componentProps:{
options:[{label:'',value:''}]
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
}
},
tableForm: {
type: 'Select',
options:[{label:'',value:''}]
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
label: '调增金额',
field: 'adjustAmount',
sort: 'custom',
label: '折扣金额',
field: 'discountAmount',
table: {
width: 150
},
isForm:false,
isTable:false,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
label: '调整税额',
field: 'adjustingTaxAmount',
table: {
width: 150
},
isTable:false,
isForm:false,
form: {
value: 'SupplierInvoice',
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6,
}
},
{
label: '申请时间',
field: 'requestTime',
label: '金税票号',
field: 'afterTaxAmount',
table: {
width: 150
},
},
{
label: '快递单号',
field: 'expressTrackingNumber',
table: {
width: 150
},
},
{
label: '发票时间',
field: 'invoiceTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -301,19 +295,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 180
},
isForm:false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '截止时间',
field: 'dueTime',
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -323,7 +318,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 180
},
isForm:false,
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
@ -356,33 +350,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
}
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '创建者',
field: 'creator',
@ -437,6 +404,15 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '自动提交',
field: 'autoCommit',
@ -444,6 +420,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
dictClass: 'string',
isTable: false,
isForm:false,
isTableForm:false,
isDetail:false,
sort: 'custom',
table: {
width: 150
@ -464,7 +442,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
isForm:false,
isTableForm:false,
isDetail:false,
sort: 'custom',
table: {
width: 150
@ -485,7 +465,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: false,
isForm: false,
isForm:false,
isTableForm:false,
isDetail:false,
sort: 'custom',
table: {
width: 150
@ -505,8 +487,10 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm: false,
isTable: false,
isForm:false,
isTableForm:false,
isDetail:false,
sort: 'custom',
table: {
width: 150
@ -566,186 +550,231 @@ export const SupplierinvoiceRequestMainRules = reactive({
* @returns {Array}
*/
export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单号',
field: 'poNumber',
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '订单行',
field: 'poLine',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchListPlaceholder: '请选择订单',
searchField: 'poLine',
searchTitle: '待开票列表',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
searchCondition: [
{
key: 'recordNumber',
value: 'recvBillNum',
message: '请填写单号!',
isMainValue: true
},
{
key: 'billType',
value: 'billType',
message: '请填写单号类型!',
isMainValue: true
},
{
key: 'poNumber',
value: 'poBillNum',
message: '请选择订单号',
key: 'supplierCode',
value: 'supplierCode',
message: '请填供应商信息!',
isMainValue: true
}
]
}
},
tableForm: {
multiple:true,//多选
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单',
searchField: 'number',
searchTitle: '订单号信息',
searchListPlaceholder: '请选择订单行',
searchField: 'poLine',
searchTitle: '待开票列表',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
searchCondition: [
{
key: 'recordNumber',
value: 'recvBillNum',
message: '请填写单号!',
key: 'supplierCode',
value: 'supplierCode',
message: '请填供应商信息!',
isMainValue: true
}
]
}
},
{
key: 'billType',
value: 'billType',
message: '请填写单号类型!',
isMainValue: true
label: '供应商税率',
field: 'tax',
table: {
width: 150
},
{
key: 'poNumber',
value: 'poBillNum',
message: '请选择订单号',
isMainValue: true
form: {
componentProps: {
disabled: true
}
]
},
tableForm:{
disabled: true
}
},
{
label: '物料代码',
field: 'itemCode',
label: '项目编码',
field: 'projectCode',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
tableForm:{
disabled: true
}
},
{
label: '货主代码',
field: 'ownerCode'
label: '单据类型',
field: 'billType',
table: {
width: 150
},
{
label: '批次',
field: 'batch',
disabled:true,
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
label: '发货单号',
field: 'asnBillNum',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 0,
precision: 6
disabled: true
}
},
tableForm:{
disabled: true
}
},
tableForm: {
type: 'InputNumber',
disabled:true,
min: 0,
precision: 6
{
label: '供应商代码',
field: 'supplierCode',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '单价',
field: 'singlePrice',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 0,
precision: 6
},
precision: 6,
}
},
tableForm: {
type: 'InputNumber',
disabled:true,
min: 0,
precision: 6
precision: 6,
}
},
{
label: '金额',
field: 'amount',
label: '采购价格',
field: 'purchasePrice',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 0,
precision: 6
},
disabled: true
}
},
tableForm: {
type: 'InputNumber',
disabled:true,
min: 0,
precision: 6
tableForm:{
disabled: true
}
},
{
label: '税率',
field: 'tax',
sort: 'custom',
label: '可开票数量',
field: 'invoicableQuantity',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
disabled: true
}
},
tableForm:{
disabled: true
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
{
label: '物料代码',
field: 'itemCode',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '比率',
field: 'rate',
sort: 'custom',
label: '物料名称',
field: 'itemName',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
disabled: true
}
},
tableForm:{
disabled: true
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
{
label: '货币',
field: 'currency',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
@ -756,6 +785,9 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
label: '创建时间',
field: 'createTime',
isTable: true,
table: {
width: 150
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -767,7 +799,10 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
label: '创建者',
field: 'creator',
isTableForm: false,
isForm: false
isForm: false,
table: {
width: 150
},
},
{
label: '操作',
@ -784,25 +819,5 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
//表单校验
export const SupplierinvoiceRequestDetailRules = reactive({
packingNumber: [
{ required: true, message: '请输入包装号', trigger: 'blur' }
],
poNumber: [
{ required: true, message: '请输入订单号', trigger: 'blur' }
],
poLine: [
{ required: true, message: '请输入订单行', trigger: 'blur' }
],
packQty: [
{ required: true, message: '请输入包装数量', trigger: 'blur' }
],
packUnit: [
{ required: true, message: '请输入包装规格', trigger: 'blur' }
],
convertRate: [
{ required: true, message: '请输入转换率', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请输入物料代码', trigger: 'blur' }
]
})

Loading…
Cancel
Save