Browse Source

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

master_hella_20240701
陈薪名 6 months ago
parent
commit
3504e06012
  1. 21
      src/api/wms/purchaseprice/index.ts
  2. 21
      src/api/wms/supplieritem/index.ts
  3. 11
      src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue
  4. 11
      src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue
  5. 22
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  6. 97
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  7. 24
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts
  8. 16
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

21
src/api/wms/purchaseprice/index.ts

@ -22,6 +22,17 @@ export const getPurchasepricePage = async (params) => {
}
}
// 查询采购价格单列表
export const getPurchasepricePageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/purchaseprice/seniorSCP', data })
} else {
return await request.get({ url: `/wms/purchaseprice/pageSCP`, params })
}
}
// 查询采购价格单详情
export const getPurchaseprice = async (id: number) => {
return await request.get({ url: `/wms/purchaseprice/get?id=` + id })
@ -52,6 +63,16 @@ export const exportPurchaseprice = async (params) => {
}
}
// 导出采购价格单 Excel
export const exportPurchasepriceSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchaseprice/export-excel-senior-SCP`, data })
} else {
return await request.download({ url: `/wms/purchaseprice/export-excel-SCP`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseprice/get-import-template' })

21
src/api/wms/supplieritem/index.ts

@ -31,6 +31,17 @@ export const getSupplieritemPage = async (params) => {
}
}
// 查询供应商物料列表
export const getSupplieritemPageSCP = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/supplieritem/seniorSCP', data })
} else {
return await request.get({ url: `/wms/supplieritem/pageSCP`, params })
}
}
// 查询供应商物料详情
export const getSupplieritem = async (id: number) => {
return await request.get({ url: `/wms/supplieritem/get?id=` + id })
@ -61,6 +72,16 @@ export const exportSupplieritem = async (params) => {
}
}
// 导出供应商物料 Excel
export const exportSupplieritemSCP = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/supplieritem/export-excel-senior-SCP`, data })
} else {
return await request.download({ url: `/wms/supplieritem/export-excel-SCP`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplieritem/get-import-template' })

11
src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue

@ -84,7 +84,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: PurchasepriceApi.getPurchasepricePage //
getListApi: routeName.value.includes('SCP')?PurchasepriceApi.getPurchasepricePageSCP:PurchasepriceApi.getPurchasepricePage //
})
//
@ -238,8 +238,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
if(routeName.value.includes('SCP')){
const data = await PurchasepriceApi.exportPurchasepriceSCP(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
}else{
const data = await PurchasepriceApi.exportPurchaseprice(tableObject.params)
download.excel(data, `${t('ts.采购价格单')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false

11
src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue

@ -83,7 +83,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: SupplieritemApi.getSupplieritemPage //
getListApi: routeName.value.includes('SCP')?SupplieritemApi.getSupplieritemPageSCP:SupplieritemApi.getSupplieritemPage //
})
//
@ -237,8 +237,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplieritemApi.exportSupplieritem(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
if(routeName.value.includes('SCP')){
const data = await SupplieritemApi.exportSupplieritemSCP(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
}else{
const data = await SupplieritemApi.exportSupplieritem(tableObject.params)
download.excel(data, `${t('ts.供应商物料')}.xlsx`)
}
} catch {
} finally {
exportLoading.value = false

22
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue

@ -84,7 +84,7 @@
import download from '@/utils/download'
import { ContainerMainRequest,ContainerMainRequestRules,ContainerDetailRequest,ContainerDetailRequestRules } from './containerMainRequest.data'
import * as ContainerMainRequestApi from '@/api/wms/containerMainRequest'
import * as ContainerDetailRequestApi from '@/api/wms/ContainerDetailRequest'
import * as ContainerDetailRequestApi from '@/api/wms/containerDetailRequest'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -115,7 +115,7 @@ const { tableObject, tableMethods } = useTable({
type:'SCRAP'
}
// toLocationCode.value = "SCRAP_CONTAIN"
businessType.value = 'ScrapContainerMenageRequest'
businessType.value = 'ScrapContainerManage'
importFileName.value = '器具报废申请'
} else if ( routeName.value == 'returnContainerMain') {
tableObject.params = {
@ -123,7 +123,7 @@ const { tableObject, tableMethods } = useTable({
}
// fromLocationCode.value = null
// toLocationCode.value = "NULL_CONTAIN"
businessType.value = 'ReturnContainerMenageRequest'
businessType.value = 'ReturnContainerManage'
importFileName.value = '器具返回申请'
} else if ( routeName.value == 'moveContainerMainRequest') {
tableObject.params = {
@ -131,7 +131,7 @@ const { tableObject, tableMethods } = useTable({
}
// fromLocationCode.value = null
// toLocationCode.value = null
businessType.value = 'MoveContainerMenageRequest'
businessType.value = 'MoveContainerManage'
importFileName.value = '器具转移申请'
} else if ( routeName.value == 'deliverContainerMainRequest') {
tableObject.params = {
@ -142,7 +142,7 @@ const { tableObject, tableMethods } = useTable({
businessType.value = 'DeliverContainerMainRequest'
importFileName.value = '器具发运申请'
} else if( routeName.value == 'containerMainRequest'){
businessType.value = 'ContainerMenageRequest'
businessType.value = 'ContainerManage'
importFileName.value = '器具管理申请'
}
@ -278,6 +278,15 @@ const buttonBaseClick = (val, item) => {
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -331,6 +340,9 @@ const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//true0
const flag = ref()
// form
const submitForm = async (formType,data) => {
data.subList = tableData.value //

97
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -195,6 +195,15 @@ const updataTableColumns = (val) => {
//
const { getList, setSearchParams } = tableMethods
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:container-main-request:create'}), //
@ -228,14 +237,7 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -254,15 +256,75 @@ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['ma
]
}
// // -
// const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'wms:container-main-request:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:container-main-request:delete'}), //
// ]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
tableObject.loading = true
ContainerMainRequestApi.close(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
ContainerMainRequestApi.reAdd(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
ContainerMainRequestApi.submit(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?')
tableObject.loading = true
ContainerMainRequestApi.refused(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?')
tableObject.loading = true
ContainerMainRequestApi.agree(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要 处理吗?')
tableObject.loading = true
ContainerMainRequestApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
@ -310,6 +372,9 @@ const submitForm = async (formType,data) => {
})
try {
if (formType === 'create') {
data.businessType = businessType.value
console.log(data.businessType,999);
await ContainerMainRequestApi.createContainerMainRequest(data)
message.success(t('common.createSuccess'))
} else {
@ -389,4 +454,4 @@ onMounted(async () => {
})
</script>
./initialContainerMainRequest.data
./initialContainerMainRequest.data

24
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

@ -257,7 +257,7 @@ export const ContainerMainRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 200,
fixed: 'right'
}
}
@ -352,6 +352,26 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '到库存状态',
field: 'toInventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'Select'
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '到数量',
field: 'toQty',
@ -438,7 +458,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 200,
fixed: 'right'
}
}

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

@ -731,6 +731,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
]))
const singlePriceFormart = (row, column, cellValue) => {
cellValue= Number(cellValue).toFixed(5)
cellValue = cellValue + '' || ''
let x = cellValue.split('.')
let x1 = x[0]
let x2 = x.length > 1 ? '.' + x[1] : ''
const reg = /(\d+)(\d{3})/
while(reg.test(x1)){
x1 = x1.replace(reg, '$1,$2')
}
return x1+x2
}
function validateTaxRate(rule, value, callback) {
if (value>0) {
callback()
@ -913,7 +927,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{
label: '合同价格',
field: 'singlePrice',
formatter: accountantFormart,
formatter: singlePriceFormart,
table: {
width: 150
},

Loading…
Cancel
Save