liuchen864 3 days ago
parent
commit
4f912cb23d
  1. 7
      src/api/wms/customerSaleInvoiceDetail/index.ts
  2. 40
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue
  3. 43
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  4. 8
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
  5. 22
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
  6. 42
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue
  7. 2
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

7
src/api/wms/customerSaleInvoiceDetail/index.ts

@ -61,7 +61,12 @@ export const deleteCustomerSaleInvoiceDetail = async (id: number) => {
// 导出客户销售开票子信息表(WMS) Excel
export const exportCustomerSaleInvoiceDetail = async (params) => {
return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params })
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/wms/customer-sale-invoice-detail/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params })
}
}
// 下载用户导入模板

40
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue

@ -167,14 +167,13 @@
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="物料"
v-model="item.Value"
placeholder="请输入物料,多个物料以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="物料" style="flex:1" placeholder="请输入物料,多个物料以逗号分隔" disabled v-else-if="item.ParamCode == 'ItemCode'"v-model="item.Value">
<template #suffix>
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchItemCode">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
</el-form-item>
<!-- 选择供应商和客户 -->
<el-form-item key="供应商和客户formItem" label="客户" class="err-240" v-if="index == 1">
@ -483,6 +482,8 @@ import * as TransactiontypeApi from '@/api/wms/transactiontype'
import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { Customer, CustomerRules } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as CustomerApi from '@/api/wms/customer'
@ -853,6 +854,21 @@ const blurCustomerList = async ()=>{
}
}
}
//
const searchItemCode = ()=>{
searchTableRef.value.open(
'请选择物料',
Itembasic.allSchemas,
ItembasicApi.getItembasicPage,
'ItemCode',
'code',
true,
undefined,
undefined,
undefined
)
}
// 线
const searchTransactionType = ()=>{
searchTableRef.value.open(
@ -960,6 +976,14 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
}
return
}
if(formField=='ItemCode'){
// --
let itemCode = formData.value.condition.find(item=>item['ParamCode']=='ItemCode')
if(itemCode){
itemCode.Value = val.map(item=>(item['code'])).join(',')
}
return
}
// let searchTableTitle = warehouseType.value == 'WarehouseCode'?'':warehouseType.value == 'AreaCode'?'':warehouseType.value == 'LocationGroupCode'?'':warehouseType.value == 'LocationCode'?'':''
console.log('searchTableSuccess',formField, searchField, val, type, row)
console.log(val.map(item=>(item['code'])).join(','))

43
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -215,14 +215,13 @@
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="物料"
v-model="item.Value"
placeholder="请输入物料,多个物料以逗号分隔"
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="物料" style="flex:1" placeholder="请输入物料,多个物料以逗号分隔" disabled v-else-if="item.ParamCode == 'ItemCode'"v-model="item.Value">
<template #suffix>
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchItemCode">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
</el-form-item>
<!-- 选择重量体积还是面积 -->
<!-- <el-form-item key="重量体积或面积formItem" label="" label-width="0" class="err-240" v-if="index == 2">-->
@ -680,7 +679,8 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as TransactiontypeApi from '@/api/wms/transactiontype'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() //
const message = useMessage() //
@ -1009,6 +1009,23 @@ const blurWarehouse = async ()=>{
})
}
//
const searchItemCode = ()=>{
searchTableRef.value.open(
'请选择物料',
Itembasic.allSchemas,
ItembasicApi.getItembasicPage,
'ItemCode',
'code',
true,
undefined,
undefined,
undefined
)
}
//
const searchTransactionType = ()=>{
searchTableRef.value.open(
@ -1108,6 +1125,14 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
}
return
}
if(formField=='ItemCode'){
// --
let itemCode = formData.value.condition.find(item=>item['ParamCode']=='ItemCode')
if(itemCode){
itemCode.Value = val.map(item=>(item['code'])).join(',')
}
return
}
// let searchTableTitle = warehouseType.value == 'WarehouseCode'?'':warehouseType.value == 'AreaCode'?'':warehouseType.value == 'LocationGroupCode'?'':warehouseType.value == 'LocationCode'?'':''
console.log('searchTableSuccess',formField, searchField, val, type, row)
console.log(val.map(item=>(item['code'])).join(','))

8
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue

@ -91,6 +91,9 @@ const inputNumberChange = (field, index, row, val) => {
// /-
row['allocationPrice'] = row['beforeTaxAmount']/row['qty'] - row['price']
// taxAmount */100,2
row['taxAmount'] = (row['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //
}
@ -205,12 +208,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
item['sumPrice'] = item['price'] + item['allocationPrice']
// *2
item['beforeTaxAmount'] = item['sumPrice']*item['qty']
// +,2
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
// taxAmount */100,2
item['taxAmount'] = (item['beforeTaxAmount'] * formRef.formModel['taxRate'])/100 //
// +,2
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
})

22
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts

@ -53,7 +53,14 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
table:{
width:120
}
},
search:{
component:'Select',
componentProps: {
multiple:true,
}
},
},
{
label: '客户对账单',
@ -200,6 +207,9 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
@ -232,6 +242,16 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x',
}
},
isForm: false,
table:{
width:180

42
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue

@ -56,6 +56,8 @@
:detailButtonIsShowAddStatusArray="['0']"
:detailButtonIsShowDelete="false"
:detailButtonIsShowAdd="false"
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-request-main:export` })]"
@buttonBaseClick="detailButtonBaseClick"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@ -75,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as AreabasicApi from '@/api/wms/areabasic'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import { status } from 'nprogress'
const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'customerSaleInvoiceMain' })
@ -102,7 +105,28 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const detailButtonBaseClick = async (val, item,tableObject) => {
if (val == 'export') {
//
console.log('子表导出',val, tableObject)
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceDetail(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
@ -276,6 +300,22 @@ const searchFormClick = (searchData) => {
}
const seachRef = ref()
const onSearchChange = (field, value)=>{
console.log('onSearchChange',field,value)
if(field=='status'){
//
if(value.length>0){
if(value[value.length-1]==''){
//
seachRef.value.setFormValues({
status:['']
})
}else{
seachRef.value.setFormValues({
status:value.filter(item=>item!='')
})
}
}
}
if(field=='customerCode'){
if(value.length>0){
if(value[value.length-1]=='ALL'){
@ -293,7 +333,7 @@ const onSearchChange = (field, value)=>{
}
const searchClick = async (data)=>{
console.log('查询',data)
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL')})
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')})
}
/** 初始化 **/
onMounted(async () => {

2
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

@ -78,6 +78,8 @@
:apiUpdate="PurchaseClaimRequestDetailApi.updatePurchaseClaimRequestDetail"
:apiPage="PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailPage"
:apiDelete="PurchaseClaimRequestDetailApi.deletePurchaseClaimRequestDetail"
:detailButtonIsShowDelete="false"
:detailButtonIsShowAdd="false"
/>
<!-- 导入 -->
<ImportForm

Loading…
Cancel
Save