Commit 963d875c by zhuzhequan

pod修改

parent 9fe71554
...@@ -8,6 +8,7 @@ export interface SearchForm { ...@@ -8,6 +8,7 @@ export interface SearchForm {
status?: string | null status?: string | null
factorySubOrderNumber?: string factorySubOrderNumber?: string
factoryOrderNumber?: string factoryOrderNumber?: string
customizedQuantity?: string
shipmentNumber?: string shipmentNumber?: string
order?: string order?: string
prop?: string prop?: string
...@@ -108,6 +109,7 @@ export type ImgList = ImageItemInter[][] ...@@ -108,6 +109,7 @@ export type ImgList = ImageItemInter[][]
export interface PodOrderRes extends PodProductList { export interface PodOrderRes extends PodProductList {
expectDeliveryTime?: string | null expectDeliveryTime?: string | null
thirdOrderNumber?: string | null
startStockingTime?: string | null startStockingTime?: string | null
userMark?: string | null userMark?: string | null
color?: string | null color?: string | null
......
...@@ -97,6 +97,12 @@ ...@@ -97,6 +97,12 @@
{{ detail?.factorySubOrderNumber }} {{ detail?.factorySubOrderNumber }}
</p> </p>
</div> </div>
<div :title="detail?.thirdOrderNumber || ''" class="div-item">
<span>第三方生产单号</span>
<p>
{{ detail?.thirdOrderNumber }}
</p>
</div>
<div :title="String(detail?.process)" class="div-item"> <div :title="String(detail?.process)" class="div-item">
<span>生产工艺</span> <span>生产工艺</span>
<p> <p>
...@@ -585,6 +591,9 @@ const trackcodeInput = async () => { ...@@ -585,6 +591,9 @@ const trackcodeInput = async () => {
try { try {
const res = await getSubOrderBySubOrderNumber(orderNumber) const res = await getSubOrderBySubOrderNumber(orderNumber)
const d = JSON.parse(JSON.stringify(res.data)) const d = JSON.parse(JSON.stringify(res.data))
if(!d){
return ElMessage.error('生产单不存在')
}
if (d.note) { if (d.note) {
d.note = JSON.parse(d.note) d.note = JSON.parse(d.note)
} else { } else {
......
...@@ -90,6 +90,17 @@ ...@@ -90,6 +90,17 @@
<el-option value="desc" label="倒序"></el-option> <el-option value="desc" label="倒序"></el-option>
</el-select> </el-select>
</ElFormItem> </ElFormItem>
<ElFormItem label="定制类型">
<el-select
v-model="searchForm.customizedQuantity"
clearable
style="width: 100px"
placeholder="定制类型"
>
<el-option value="single" label="单面"></el-option>
<el-option value="multiple" label="多面"></el-option>
</el-select>
</ElFormItem>
<ElFormItem> <ElFormItem>
<ElButton type="primary" @click="loadDiffList">查询</ElButton> <ElButton type="primary" @click="loadDiffList">查询</ElButton>
</ElFormItem> </ElFormItem>
...@@ -449,7 +460,7 @@ ...@@ -449,7 +460,7 @@
style="white-space: nowrap" style="white-space: nowrap"
> >
<span <span
:title="`第三方单号:${cardItem?.thirdSubOrderNumber}`" :title="`第三方生产单号:${cardItem?.thirdSubOrderNumber}`"
style=" style="
display: inline-block; display: inline-block;
width: 100%; width: 100%;
...@@ -469,6 +480,29 @@ ...@@ -469,6 +480,29 @@
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 5px">
<el-col
:span="12"
:offset="0"
style="white-space: nowrap"
>
<span
:title="`第三方订单号:${cardItem?.thirdOrderNumber}`"
style="
display: inline-block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
"
@click.stop="
copy(String(cardItem?.thirdOrderNumber || ''))
"
>
{{ cardItem?.thirdOrderNumber }}
</span>
</el-col>
</el-row>
</div> </div>
</template> </template>
</CardWrapper> </CardWrapper>
...@@ -723,17 +757,23 @@ ...@@ -723,17 +757,23 @@
</template> </template>
</TableView> </TableView>
</div> </div>
<el-pagination <div class="pagination">
v-model:current-page="currentPage" <div>
v-model:page-size="pageSize" <span>已选择 <span style="color: red">{{selection.length}}</span> 条数据</span>
:page-sizes="[100, 200, 300, 400]" </div>
background <el-pagination
layout="total, sizes, prev, pager, next, jumper" v-model:current-page="currentPage"
:total="total" v-model:page-size="pageSize"
style="margin: 10px auto 10px; text-align: right" :page-sizes="[100, 200, 300, 400]"
@size-change="handleSizeChange" background
@current-change="handleCurrentChange" layout="total, sizes, prev, pager, next, jumper"
/> :total="total"
style="margin: 10px auto 10px; text-align: right"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div> </div>
</div> </div>
<el-dialog <el-dialog
...@@ -906,7 +946,6 @@ import { ...@@ -906,7 +946,6 @@ import {
import fastProduction from '../fastProduction.vue' import fastProduction from '../fastProduction.vue'
import CardWrapper from '@/components/CardPods.vue' import CardWrapper from '@/components/CardPods.vue'
import { CustomColumn } from '@/types/table' import { CustomColumn } from '@/types/table'
import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue' import { useValue } from '@/utils/hooks/useValue'
import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue' import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
...@@ -931,6 +970,10 @@ import { showConfirm } from '@/utils/ui' ...@@ -931,6 +970,10 @@ import { showConfirm } from '@/utils/ui'
import { filePath } from '@/api/axios' import { filePath } from '@/api/axios'
import LogList from '@/components/LogList.vue' import LogList from '@/components/LogList.vue'
const tableRef = ref() const tableRef = ref()
const loading = ref(false)
const currentPage = ref(1)
const pageSize = ref(100)
const total = ref(0)
const countVisible = ref(false) const countVisible = ref(false)
const keyCode = ref('') const keyCode = ref('')
const cardItem = ref<PodProductList | CardOrderData>() const cardItem = ref<PodProductList | CardOrderData>()
...@@ -945,6 +988,14 @@ const rightClick = (e: MouseEvent, item: PodProductList | CardOrderData) => { ...@@ -945,6 +988,14 @@ const rightClick = (e: MouseEvent, item: PodProductList | CardOrderData) => {
el: e, el: e,
}) })
} }
const handleSizeChange = (size:number)=>{
pageSize.value = size
loadDiffList()
}
const handleCurrentChange = (page:number)=>{
currentPage.value = page
loadDiffList()
}
const rightChange = async (code: string) => { const rightChange = async (code: string) => {
const flag = ['IN_PRODUCTION', 'WAIT_SHIPMENT'].includes(status.value) const flag = ['IN_PRODUCTION', 'WAIT_SHIPMENT'].includes(status.value)
if (code === 'check_all') { if (code === 'check_all') {
...@@ -1148,6 +1199,27 @@ const loadCardList = async () => { ...@@ -1148,6 +1199,27 @@ const loadCardList = async () => {
// showError(error) // showError(error)
} }
} }
const loadOrderList = async () => {
try {
const res = await getOrderList({
...searchForm.value,
status: status.value,
timeType: searchForm.value.timeType,
startTime:
timeRange.value && timeRange.value.length > 0
? timeRange.value[0]
: null,
endTime:
timeRange.value && timeRange.value.length > 0
? timeRange.value[1]
: null
},currentPage.value,pageSize.value)
tableData.value = res.data.records
total.value = res.data.total
} catch (error) {
// showError(error)
}
}
const currentImage = ref('') const currentImage = ref('')
const currentId = ref(-1) const currentId = ref(-1)
const changeImages = ( const changeImages = (
...@@ -1210,6 +1282,8 @@ const isSelectStatused = (data: PodProductList | CardOrderData) => { ...@@ -1210,6 +1282,8 @@ const isSelectStatused = (data: PodProductList | CardOrderData) => {
} }
const changeTab = (item: Tab) => { const changeTab = (item: Tab) => {
status.value = item.status ?? '' status.value = item.status ?? ''
currentPage.value = 1
pageSize.value = 100
selection.value = [] selection.value = []
searchForm.value.timeType = null searchForm.value.timeType = null
loading.value = false loading.value = false
...@@ -1222,7 +1296,7 @@ const fastClose = () => { ...@@ -1222,7 +1296,7 @@ const fastClose = () => {
detailVisible.value = false detailVisible.value = false
} }
// 根据不同状态调用不同接口 // 根据不同状态调用不同接口
const loadDiffList = () => { const loadDiffList = async () => {
if ( if (
[ [
'IN_PRODUCTION', 'IN_PRODUCTION',
...@@ -1231,15 +1305,16 @@ const loadDiffList = () => { ...@@ -1231,15 +1305,16 @@ const loadDiffList = () => {
'INVALID', 'INVALID',
].includes(status.value) ].includes(status.value)
) { ) {
loadCardList() await loadCardList()
} else { } else {
search() loadOrderList()
updateColumnWidth() updateColumnWidth()
} }
} }
const [searchForm] = useValue<SearchForm>({ const [searchForm] = useValue<SearchForm>({
timeType: null, timeType: null,
shopNumber: '', shopNumber: '',
customizedQuantity: '',
order: 'desc', order: 'desc',
}) })
const tableColumns = computed<CustomColumn<CardOrderData[]>>(() => { const tableColumns = computed<CustomColumn<CardOrderData[]>>(() => {
...@@ -1283,38 +1358,49 @@ const tableColumns = computed<CustomColumn<CardOrderData[]>>(() => { ...@@ -1283,38 +1358,49 @@ const tableColumns = computed<CustomColumn<CardOrderData[]>>(() => {
}, },
] ]
}) })
const { // const {
loading, // loading,
currentPage, // currentPage,
pageSize, // pageSize,
total, // total,
data: tableData, // data: tableData,
refresh: search, // refresh: search,
onCurrentPageChange: handleCurrentChange, // onCurrentPageChange: handleCurrentChange,
onPageSizeChange: handleSizeChange, // onPageSizeChange: handleSizeChange,
} = usePageList<OrderData | CardOrderData>({ // } = usePageList<OrderData | CardOrderData>({
query: async (page, pageSize) => { // query: async (page, pageSize) => {
const commonParams = { // const commonParams = {
...searchForm.value, // ...searchForm.value,
status: status.value, // status: status.value,
timeType: searchForm.value.timeType, // timeType: searchForm.value.timeType,
startTime: // startTime:
timeRange.value && timeRange.value.length > 0 // timeRange.value && timeRange.value.length > 0
? timeRange.value[0] // ? timeRange.value[0]
: null, // : null,
endTime: // endTime:
timeRange.value && timeRange.value.length > 0 // timeRange.value && timeRange.value.length > 0
? timeRange.value[1] // ? timeRange.value[1]
: null, // : null,
} // }
// 动态选择接口 // // 动态选择接口
const fetchData = // const fetchData =
status.value === 'IN_PRODUCTION' ? getCardOrderList : getOrderList // status.value === 'IN_PRODUCTION' ? getCardOrderList : getOrderList
return fetchData(commonParams, page, pageSize).then( // return fetchData(commonParams, page, pageSize).then(
(res) => res.data, // (res) => {
) as never // if([
}, // 'IN_PRODUCTION',
}) // 'WAIT_SHIPMENT',
// 'TO_BE_REPLENISHMENT',
// 'INVALID',
// ].includes(status.value)){
// CardOrderList.value = res.data.records as PodProductList[]
// }else{
// tableData.value = res.data.records
// }
// },
// ) as never
// },
// })
// 发货 // 发货
const { const {
shipmentFormRef, shipmentFormRef,
...@@ -1418,6 +1504,7 @@ const openAll = (row: CardOrderData) => { ...@@ -1418,6 +1504,7 @@ const openAll = (row: CardOrderData) => {
} }
// 表格和卡片的选中值:有两种约束 // 表格和卡片的选中值:有两种约束
const selection = ref<(CardOrderData | PodProductList)[]>([]) const selection = ref<(CardOrderData | PodProductList)[]>([])
const tableData = ref<(OrderData)[]>([])
const handleSelectionChange = (s: CardOrderData[]) => { const handleSelectionChange = (s: CardOrderData[]) => {
selection.value = s selection.value = s
} }
...@@ -1483,7 +1570,7 @@ const applyForReplacement = async () => { ...@@ -1483,7 +1570,7 @@ const applyForReplacement = async () => {
try { try {
const res = await applyForReplenishmentApi(data) const res = await applyForReplenishmentApi(data)
loadDiffList() await loadDiffList()
await loadTabData() await loadTabData()
ElMessage.success(res.message) ElMessage.success(res.message)
} catch (e) { } catch (e) {
...@@ -2116,4 +2203,8 @@ onBeforeUnmount(() => { ...@@ -2116,4 +2203,8 @@ onBeforeUnmount(() => {
font-size: 14px; font-size: 14px;
} }
} }
.pagination{
display: flex;
align-items: center;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment