Commit b8d91a05 by wuqian

质检排序

parent ef5c4b4f
...@@ -14,6 +14,7 @@ export interface SearchForm { ...@@ -14,6 +14,7 @@ export interface SearchForm {
internalMemo: string internalMemo: string
status?: number status?: number
subOrderNumber: string subOrderNumber: string
order: string
} }
export interface Tab { export interface Tab {
......
...@@ -95,9 +95,17 @@ export default function useQuarantine() { ...@@ -95,9 +95,17 @@ export default function useQuarantine() {
try { try {
const res = await getQaOrderBySubOrderNumber(code) const res = await getQaOrderBySubOrderNumber(code)
const code1 = code?.split('_')[0] const code1 = code?.split('_')[0]
res.data.forEach((el) => { res.data = res.data.map((item) => {
el.isCheck = el.inspectionStatus return {
...item,
isCheck: item.inspectionStatus,
}
}) })
// 删除旧的inspectionStatus
res.data = res.data.map(({ inspectionStatus, ...rest }) => rest)
res.data.sort((a, b) =>
a.isCheck === b.isCheck ? 0 : a.isCheck ? 1 : -1,
) //false在前,true在后
activeTab.value = 'all' activeTab.value = 'all'
sourceData.value = res.data sourceData.value = res.data
_sourceData.value = res.data _sourceData.value = res.data
...@@ -221,6 +229,7 @@ export default function useQuarantine() { ...@@ -221,6 +229,7 @@ export default function useQuarantine() {
dzjTotal.value = _sourceData.value.filter((item) => !item.isCheck).length dzjTotal.value = _sourceData.value.filter((item) => !item.isCheck).length
yzjTotal.value = allTotal.value - dzjTotal.value yzjTotal.value = allTotal.value - dzjTotal.value
qaInputRef.value.focus() qaInputRef.value.focus()
onChangeTab(activeTab.value)
} }
// 新的onReissue // 新的onReissue
const giveDelivery = (form: shopRemark) => { const giveDelivery = (form: shopRemark) => {
......
...@@ -135,7 +135,17 @@ ...@@ -135,7 +135,17 @@
style="width: 130px" style="width: 130px"
></ElInput> ></ElInput>
</ElFormItem> </ElFormItem>
<ElFormItem label="排序">
<el-select
v-model="searchForm.order"
clearable
style="width: 100px; margin-right: 5px"
placeholder="排序类型"
>
<el-option value="asc" label="正序"></el-option>
<el-option value="desc" label="倒序"></el-option>
</el-select>
</ElFormItem>
<ElFormItem> <ElFormItem>
<ElButton type="primary" @click="search">查询</ElButton> <ElButton type="primary" @click="search">查询</ElButton>
</ElFormItem> </ElFormItem>
...@@ -548,7 +558,7 @@ ...@@ -548,7 +558,7 @@
style="margin-right: -14px" style="margin-right: -14px"
> >
<div <div
style="flex: 1; flex-shrink: 0;" style="flex: 1; flex-shrink: 0"
class="order-list-expand" class="order-list-expand"
> >
<ProductInfoInspected :row="row" :status="statusCode" /> <ProductInfoInspected :row="row" :status="statusCode" />
...@@ -957,6 +967,7 @@ const [searchForm] = useValue<SearchForm>({ ...@@ -957,6 +967,7 @@ const [searchForm] = useValue<SearchForm>({
orderNumber: '', orderNumber: '',
internalMemo: '', internalMemo: '',
subOrderNumber: '', subOrderNumber: '',
order: 'desc',
}) })
const tabsNav = ref<Tab[]>([]) const tabsNav = ref<Tab[]>([])
const splitRef = ref<InstanceType<typeof SplitDiv>>() const splitRef = ref<InstanceType<typeof SplitDiv>>()
......
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