Browse Source

Merge branch 'hella_online_20240919' into master_hella

syhx
陈薪名 2 months ago
parent
commit
498f8f8960
  1. 13
      src/api/wms/business/inputBlur.ts
  2. 6
      src/api/wms/saleShipmentMain/index.ts
  3. 4
      src/api/wms/saleShipmentMainRecord/index.ts
  4. 2
      src/api/wms/stdcostprice/index.ts
  5. 4
      src/components/Detail/src/Detail.vue
  6. 1
      src/locales/en-US.ts
  7. 1
      src/locales/zh-CN.ts
  8. 2
      src/utils/dict.ts
  9. 4
      src/utils/disposition/defaultButtons.ts
  10. 15
      src/views/system/passwordRule/index.vue
  11. 32
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  12. 25
      src/views/wms/countManage/count/countJobMain/index.vue
  13. 1
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  14. 35
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue
  15. 46
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  16. 14
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  17. 165
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts
  18. 66
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue
  19. 617
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts
  20. 68
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMTypeMain/purchasereceiptRecordMain.data.ts
  21. 4
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue
  22. 63
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  23. 5
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

13
src/api/wms/business/inputBlur.ts

@ -49,7 +49,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
params.value[searchCondition[i].key] == '' ||
params.value[searchCondition[i].key] == undefined
) {
isNull = true
if(!searchCondition[i].isOptional){ // 添加参数可选可空的判断
isNull = true
}
}
if (isNull) {
message.warning(
@ -58,6 +60,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
row[headerItem.field] = ''
return
}
if(searchCondition[i].isOptional&&!params.value[searchCondition[i].key]){ // 添加参数可选可空的判断
continue
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
@ -493,7 +498,11 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
if(!searchCondition1[i].isOptional){ // 添加参数可选可空的判断
if(!searchCondition1[i].isOptional){ // 添加参数可选可空的判断
isNull = true
}
}
}
if (isNull) {
message.warning(

6
src/api/wms/saleShipmentMain/index.ts

@ -98,9 +98,3 @@ export const agree = async (id) => {
export const handle = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/handle?id=` + id })
}
// 处理-结算出库废弃
export const abort = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/abort?id=` + id })
}

4
src/api/wms/saleShipmentMainRecord/index.ts

@ -60,3 +60,7 @@ export const exportSaleShipmentMainRecord = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/sale-shipment-main-record/get-import-template' })
}
// 处理-结算出库撤销
export const abort = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-record/abort?id=` + id })
}

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

@ -59,6 +59,6 @@ export const importTemplate = () => {
// 查询标准成本价格单列表
export const queryStdcostpriceByItemCode = async (data: StdcostpriceVO) => {
export const queryStdcostpriceByItemCode = async (data) => {
return await request.post({ url: `/wms/stdcostprice/queryStdcostpriceByItemCode`, data })
}

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

@ -1110,8 +1110,8 @@ const openImage=(item)=>{
* @param field 当前操作字段
* @param cur 改变后值
*/
const detailBasicFormOnChange = (field, cur) => {
emit('detailBasicFormOnChange', field, cur)
const detailBasicFormOnChange = (field, cur, formRef) => {
emit('detailBasicFormOnChange', field, cur, formRef)
}
/**

1
src/locales/en-US.ts

@ -691,6 +691,7 @@ export default {
:'Forecast Date',
:'Order Line',
:'Planned Quantity',
0:'The number of plans must be greater than 0',
:'Last update time',
:'Last Updater',
:'Demand plan',

1
src/locales/zh-CN.ts

@ -693,6 +693,7 @@ export default {
:'预测日期',
:'订单行',
:'计划数量',
0:'计划数量必须大于0',
:'最后更新时间',
:'最后更新者',
:'要货计划',

2
src/utils/dict.ts

@ -404,5 +404,5 @@ export enum DICT_TYPE {
RETURN_REASON_TYPE = 'return_reason_type', // 采购退货原因类型
SCRAPPING_REASON = 'scrapping_reason', //制品子件报废原因
RECEIVE_STATUS = 'receive_status', // 收货确认状态
LINE_SCRAP_REASON = 'line_scrap_reason', // 线边报废原因
LINE_SCRAP_REASON = 'Reason_or_scrapping_of_production_line', // 线边报废原因(现场史力维护的字典)
}

4
src/utils/disposition/defaultButtons.ts

@ -648,8 +648,8 @@ export function mainListHandleBtn(option: any) {
// 主列表-申请流程-作废按钮
export function mainListAbortBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.终止`).replace('ts.', ''),
name: 'mainAbort',
label: t(`ts.撤销`).replace('ts.', ''),
name: 'abort',
hide: false,
type: 'primary',
color: '',

15
src/views/system/passwordRule/index.vue

@ -105,16 +105,7 @@ const rules = {
againPassword: [required]
}
const reset = () => {
passwordConfig.value = {
status: true,
ruleLevel: "简单",
ruleDesc: "1",
tryCount: 3,
lockHours: 1,
updatePeriod: 30,
dayTryCount: 3,
updateRemind: 7,
}
getConfig()
}
const passwordConfig = ref({
status: true,
@ -122,8 +113,8 @@ const passwordConfig = ref({
ruleDesc: "",
tryCount: 3,
lockHours: 1,
updatePeriod: 30,
dayTryCount: 3,
updatePeriod: 180,
dayTryCount: 5,
updateRemind: 7,
})
/** 查询配置 */

32
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -1210,6 +1210,37 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
let TransactionType = formData.value.condition[5]['Value']
if(Array.isArray(TransactionType)){
TransactionType = TransactionType.join(',')
}
if(TransactionType=='Repleinment'){
//--
let msg = ''
let itemCodeType = formData.value.condition[1]['ParamCode']
let itemCodes = formData.value.condition[1]['Value']
if(Array.isArray(itemCodes)){
itemCodes = itemCodes.join(',')
}
let locationCodes = formData.value.configuration.LocationCode
if(Array.isArray(locationCodes)){
locationCodes = locationCodes.join(',')
}
if(itemCodeType!='ItemCode'){
msg = '请选择物料'
}else if(itemCodes.trim().length<=0){
msg = '请您选择物料'
}else if(warehouseType.value!='LocationCode'){
//
msg = '请选择库位'
}else if(locationCodes.trim().length<=0){
msg = '请您选择库位'
}
if(msg){
message.error(msg)
return
}
}
await blurWarehouse()
// await blurTransactionType()
if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){
@ -1230,6 +1261,7 @@ const submitForm = async () => {
message.error('请选择库位')
return
}
//
if (!formRef) return

25
src/views/wms/countManage/count/countJobMain/index.vue

@ -326,17 +326,22 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
//
countJobDetailTableColumns.value.tableColumns = []
// countJobDetailTableColumns.value.tableColumns = []
// if (ro.isOpenCount == "FALSE") {
// CountJobDetail.allSchemas.tableColumns.forEach((item) => {
// if (item.field != 'qty') {
// countJobDetailTableColumns.value.tableColumns.push(item)
// }
// })
// } else {
// countJobDetailTableColumns.value.tableColumns = JSON.parse(
// JSON.stringify(CountJobDetail.allSchemas.tableColumns)
// )
// }w
if (row.isOpenCount == "FALSE") {
CountJobDetail.allSchemas.tableColumns.forEach((item) => {
if (item.field != 'qty') {
countJobDetailTableColumns.value.tableColumns.push(item)
}
})
} else {
countJobDetailTableColumns.value.tableColumns = JSON.parse(
JSON.stringify(CountJobDetail.allSchemas.tableColumns)
)
countJobDetailTableColumns.value.tableColumns = CountJobDetail.allSchemas.tableColumns.filter(item=>item.field != 'qty')
}else{
countJobDetailTableColumns.value.tableColumns = CountJobDetail.allSchemas.tableColumns.filter(item=>item.field)
}
detailRef.value.openDetail(row, titleName, titleValue, 'jobCountMain')

1
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -1041,6 +1041,7 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isSearch: true,
tableForm: {
enterSearch:true,
isRepeat: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码',
searchField: 'toLocationCode',

35
src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue

@ -33,8 +33,8 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row, $index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -74,6 +74,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import * as saleShipmentMainRecordApi from "@/api/wms/saleShipmentMainRecord";
const { loadStart, loadDone } = usePageLoading()
defineOptions({ name: 'SaleShipmentMainRecord' })
@ -141,12 +142,21 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', item)
}
}
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), //
]
const butttondata = (row, $index) => {
const findIndex = row['masterId']
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return []
}
return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), //
defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-request:abort',hide:(row.revokeFlag=='TRUE'||row.relateRecordNumber != null ) }), //
]
}
// -
const buttonTableClick = async (val, row) => {
@ -154,6 +164,17 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'abort') { //
await message.confirm('确认要撤销吗?')
tableObject.loading = true
saleShipmentMainRecordApi.abort(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
}
}

46
src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

@ -32,6 +32,33 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
}
},
{
label: '关联单据号',
field: 'relateRecordNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '是否已撤销',
field: 'revokeFlag',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
table: {
width: 150
},
detail:{
// dictType:'primary',
// valueFilter:(value)=>{
// if(value=='TRUE'){
// return `是`
// }else{
// return '否'
// }
// }
}
},
{
label: '发票时间',
field: 'invoiceTime',
@ -91,7 +118,6 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable:false
},
@ -146,15 +172,15 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isTable:false
},
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验

14
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -249,7 +249,6 @@ const butttondata = (row,$index) => {
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), //
// defaultButtons.mainListAbortBtn({hide:isShowMainButton(row,['8']),hasPermi:'wms:sale-shipment-main-request:abort'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), //
]
}
@ -324,18 +323,7 @@ const buttonTableClick = async (val, row) => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainAbort') { //
await message.confirm('确认要终止吗?')
tableObject.loading = true
SaleShipmentMainApi.abort(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
}else if (val == 'edit') { //
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)

165
src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts

@ -4,6 +4,15 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/**
* @returns {Array} 退
*/
@ -72,6 +81,156 @@ export const ProductionscrapRecordMain = useCrudSchemas(
}
}
},
{
label: '报废原因',
field: 'lineScrapReason',
dictType: DICT_TYPE.LINE_SCRAP_REASON,
dictClass: 'string',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage,
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
isForm:false,
isTable:false,
isTableForm:false,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择领用原因代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '车间代码',
field: 'workshopCode',
@ -557,6 +716,8 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
},
{
label: '从库位组代码',
@ -574,6 +735,7 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
},
{
@ -592,6 +754,7 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
},
{
@ -643,8 +806,6 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
},
{
label: '单据号',

66
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue

@ -59,6 +59,8 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@inputNumberChange="inputNumberChange"
@clearSearchInput="clearSearchInput"
/>
<!-- 详情 -->
@ -75,6 +77,8 @@
@searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm"
:detailValidate="detailValidate"
@detailBasicFormOnChange="qtyOnChange"
/>
<!-- 创建标签 -->
@ -101,6 +105,7 @@
<script setup lang="ts">
import download from '@/utils/download'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProductionscrapRequestMain,ProductionscrapRequestMainRules,ProductionscrapRequestDetail,ProductionscrapRequestDetailRules,ProductionscrapRequestDetailLabel,ProductionscrapRequestDetailLabelRules, SupplierdeliverRequestPackage } from './productionscrapRequestMain.data'
import * as ProductionscrapRequestMainApi from '@/api/wms/productionscrapRequestMain'
@ -183,7 +188,34 @@ const isItemType = async (itemCode, labelTypeParams) => {
if (!isType) labelType.value = labelTypeOld
return isType
}
const qtyOnChange = (field, cur, formRef) => {
console.log('qtyOnChange',field, cur)
console.log(formRef.value)
if(field == 'qty' ){
const setV = {
amount:Number(Number(cur * formRef.value.formModel.singlePrice).toFixed(2))
}
formRef.value.setValues(setV)
}
}
const inputNumberChange = (field, index, row, val) => {
if(field == 'qty' ){
row.amount = Number(Number(row.qty * row.singlePrice).toFixed(2))
}
}
const clearSearchInput = (field)=>{
console.log('field',field)
if('workshopCode'==field){
//
formRef.value.formRef.setValues({
productionLineCode: ''
})
tableData.value = []
}else if('productionLineCode'==field){
//线
tableData.value = []
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(async () => {
@ -216,6 +248,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
item.tableForm.max = val[0]['qty']
}
})
let param = {'itemCodes':val[0]['itemCode']}
let resyStdcost = await StdcostpriceApi.queryStdcostpriceByItemCode(param)
console.log('resyStdcost',resyStdcost)
if(resyStdcost&&resyStdcost.length>0){
row['singlePrice'] = resyStdcost[0].price
row['amount'] = Number(Number(resyStdcost[0].price * row['qty']).toFixed(2))
}
}
} else if(formField == 'workStationCode') {
//
@ -233,6 +272,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}
} else {
const setV = {}
if(formField == 'workshopCode'){
setV['productionLineCode'] = ''
tableData.value = []
}
if(formField == 'costCenterCode'){
setV['costcentreCode'] = val[0]['costcentreCode']
setV['costCenterType'] = val[0]['costcentreType']
}
if(formField == 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code']
}
setV[formField] = val[0][searchField]
tableData.value = [] //
formRef.setValues(setV)
@ -524,6 +574,13 @@ const openForm =async (type: string, row?: number) => {
if (type == 'update') {
// tableform
ProductionscrapRequestMain.allSchemas.formSchema.map(itemColumns => {
if(itemColumns.field == 'productionLineCode') {
//线
itemColumns.componentProps.disabled = true
itemColumns.componentProps.isSearchList = false
itemColumns.componentProps.enterSearch = false
}
if(itemColumns.field == 'workshopCode') {
itemColumns.componentProps.isSearchList = false
itemColumns.componentProps.disabled = true
@ -532,6 +589,13 @@ const openForm =async (type: string, row?: number) => {
} else {
// tableform
ProductionscrapRequestMain.allSchemas.formSchema.map(itemColumns => {
if(itemColumns.field == 'productionLineCode') {
//线
itemColumns.componentProps.disabled = false
itemColumns.componentProps.isSearchList = true
itemColumns.componentProps.enterSearch = true
}
if(itemColumns.field == 'workshopCode') {
itemColumns.componentProps.isSearchList = true
itemColumns.componentProps.disabled = false

617
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts

@ -9,7 +9,6 @@ import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as WorkstationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
@ -26,6 +25,19 @@ import { TableColumn } from '@/types/table'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as confgiApi from '@/api/infra/config'
// import * as LocationApi from '@/api/wms/location'
// import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
@ -47,6 +59,342 @@ const userDept = userStore.userSelfInfo.dept
userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept]
const confgiDataOne = await confgiApi.queryByKey("WorkStation-IN")
const confgiDataTwo = await confgiApi.queryByKey("WorkStation-OUT")
/**
* @returns {Array}
*/
export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isSearch: true
},
{
label: '名称',
field: 'name',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '原料库位',
field: 'rawLocationCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.selectAreaTypeToLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'areaType',
value: confgiDataOne.areaType,
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '成品库位',
field: 'fgLocationCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.selectAreaTypeToLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'areaType',
value: confgiDataTwo.areaType,
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
// {
// label: '类型',
// field: 'type',
// dictType: DICT_TYPE.WORK_STATION_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '车间代码',
field: 'workshopCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '是否可用',
field: 'available',
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: 'activeTime',
isTable: true,
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: 'expireTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
sort: 'custom',
table: {
width: 180
},
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: true,
table: {
width: 150
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
}
}
]))
/**
* @returns {Array} 退
*/
@ -63,6 +411,25 @@ export const ProductionscrapRequestMain = useCrudSchemas(
isForm: false,
isSearch: true
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: 'Q3通知单号',
field: 'q3Number',
@ -127,22 +494,134 @@ export const ProductionscrapRequestMain = useCrudSchemas(
}
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
isForm: false,
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage,
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
isForm:false,
isTable:false,
isTableForm:false,
form: {
value: '1',
componentProps: {
disabled: true
}
},
},
{
label: '原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择领用原因代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
@ -281,6 +760,8 @@ export const ProductionscrapRequestMain = useCrudSchemas(
table: {
width: 180
},
isForm:false,
isTableForm:false,
isTable: false,
form: {
component: 'DatePicker',
@ -364,7 +845,9 @@ export const ProductionscrapRequestMain = useCrudSchemas(
table: {
width: 150
},
isTable: false
isForm:false,
isTableForm:false,
isTable: false,
},
{
label: '业务类型',
@ -598,7 +1081,16 @@ export const ProductionscrapRequestMainRules = reactive({
{ required: true, message: '请选择车间', trigger: 'change' }
],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
{ required: false, message: '请选择生产线代码', trigger: 'change' }
],
lineScrapReason: [
{ required: true, message: '请选择报废原因', trigger: 'change' }
],
costCenterCode: [
{ required: true, message: '请选择成本中心代码', trigger: 'change' }
],
reasonCodeRequisition: [
{ required: true, message: '请选择原因代码', trigger: 'change' }
],
})
@ -615,6 +1107,7 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
hiddenInMain: true,
isTableForm: false,
isForm:false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -684,7 +1177,8 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'productionLineCode',
value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
}],
@ -712,7 +1206,9 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
key: 'productionLineCode',
value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
}],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
@ -937,6 +1433,52 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
}
},
{
label: '单价',
field: 'singlePrice',
sort: 'custom',
table: {
width: 150
},
isTable:false,
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 2,
},
},
tableForm: {
disabled: true,
type: 'InputNumber',
min: 0,
precision: 2,
}
},
{
label: '金额',
field: 'amount',
sort: 'custom',
table: {
width: 150
},
isTable:false,
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 0,
precision: 2,
}
},
tableForm: {
type: 'InputNumber',
disabled:true,
min: 0,
precision: 2,
},
},
{
label: '库存状态',
field: 'inventoryStatus',
@ -1006,10 +1548,48 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
isTableForm: false,
isForm: false,
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '选择项目代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage,
verificationParams: [{
key: 'projectCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '选择项目代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'projectCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '单据号',
@ -1036,6 +1616,7 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
isTable:false,
isTableForm: false,
isForm: false,
tableForm: {
enterSearch:true,
isInpuFocusShow: true,
@ -1095,6 +1676,7 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
isTable:false,
isTableForm: false,
isForm: false,
tableForm:{
disabled: true
},
@ -1113,6 +1695,7 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
isTable:false,
isTableForm: false,
isForm: false,
tableForm: {
disabled: true
},

68
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMTypeMain/purchasereceiptRecordMain.data.ts

@ -426,16 +426,16 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 400,
fixed: 'right'
},
},
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 400,
// fixed: 'right'
// },
// },
{
label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
field: 'fromBatch',
@ -456,15 +456,15 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:16,
},
{
label: '检验申请单号',
field: 'inspectNumber',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:6,
},
// {
// label: '检验申请单号',
// field: 'inspectNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:6,
// },
{
label: '数量',
field: 'qty',
@ -675,7 +675,7 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
disabled: true
}
},
isSearch: true,
isSearch: false,
},
{
label: '是否已生成上架申请',
@ -694,7 +694,7 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
disabled: true
}
},
isSearch: true,
isSearch: false,
},
{
label: '物料类型',
@ -1224,19 +1224,19 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:2000,
},
{
label: '操作',
hiddenInMain:true,
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
//
// {
// label: '操作',
// hiddenInMain:true,
// field: 'action',
// isDetail: false,
// isForm: false ,
// table: {
// width: 150,
// fixed: 'right'
// },
// isTableForm:true,
// }
]))
// 表单校验

4
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue

@ -136,14 +136,14 @@ const butttondata = (row,$index) => {
if(findIndex>-1&&findIndex<$index){
return []
}
// return [defaultButtons.mainListDocumentPrintBtn(null)]
return [defaultButtons.mainListDocumentPrintBtn(null)]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'documentPrint') {
//
// handleDocumentPrint(row.requestNumber,row.itemCode)
handleDocumentPrint(row.requestNumber,row.itemCode)
}
}

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

@ -83,7 +83,6 @@
:detailAllSchemas="PurchasePlanDetail.allSchemas"
:detailAllSchemasRules="PurchasePlanDetailRules"
:apiCreate="PurchasePlanDetailApi.createPurchasePlanDetail"
:apiUpdate="PurchasePlanDetailApi.updatePurchasePlanDetail"
:apiPage="PurchasePlanDetailApi.getPurchasePlanDetailPage"
:apiDelete="PurchasePlanDetailApi.deletePurchasePlanDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
@ -98,6 +97,8 @@
:isOpenSearchTable="true"
:mainSubmitCreateApi="true"
fieldTableColumn="poLine"
@detailOpenForm="detailOpenForm"
@handleSubmitForm="handleDetailSubmitForm"
/>
<!-- 导入 -->
@ -517,7 +518,26 @@ const getSearchTableData = async (number,formField,searchField)=>{
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
}
const detailOpenForm = (type, row) => {
PurchasePlanDetail.allSchemas.formSchema.forEach(item=>{
if(item.field == 'planQty'){
//
item.componentProps.disabled = row.available=="FALSE"
}
})
}
const handleDetailSubmitForm = async (formType, data)=>{
if(formType == 'update'){
if(Number(data.planQty)<=0){
message.error(t('ts.计划数量必须大于0'))
return
}
await PurchasePlanDetailApi.updatePurchasePlanDetail(data)
message.success(t('common.updateSuccess'))
}
detailRef.value.submitUpdateList()
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
@ -865,25 +885,26 @@ const handleSelectionPublish = async ()=>{
// /
const detailValidate = async (data) => {
let tag = false
await PurchaseDetailApi.getPurchaseDetailPageCheckData({
number: data.poNumber,
lineNumber: data.poLine
}).then(res => {
if(res.list[0].type == 'DISCRETE'){//
if (data.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
message.error(t('ts.要货计划数量不得大于订单数量-已计划数量'))
tag = false
} else {
tag = true
}
}else{
tag = true
}
}).catch(err =>{
console.log(err);
})
return tag
return true
// let tag = false
// await PurchaseDetailApi.getPurchaseDetailPageCheckData({
// number: data.poNumber,
// lineNumber: data.poLine
// }).then(res => {
// if(res.list[0].type == 'DISCRETE'){//
// if (data.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
// message.error(t('ts.-'))
// tag = false
// } else {
// tag = true
// }
// }else{
// tag = true
// }
// }).catch(err =>{
// console.log(err);
// })
// return tag
}
/** 导入 */

5
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -138,6 +138,11 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
value: 4,
isMainValue: false
},
{
key: 'flag',
value: 1,
isMainValue: false
},
{
key: 'available',
value: "TRUE",

Loading…
Cancel
Save