| | |
| | | <view> |
| | | <wd-row> |
| | | <wd-col :span="21"> |
| | | <wd-search placeholder-left hide-cancel></wd-search> |
| | | <wd-search |
| | | v-model="searchKeyword" |
| | | placeholder="请输入规格型号" |
| | | placeholder-left |
| | | hide-cancel |
| | | @search="handleSearch" |
| | | @clear="handleClear" |
| | | ></wd-search> |
| | | </wd-col> |
| | | <wd-col :span="3"> |
| | | <view class="scan_box" @click="openScan"> |
| | |
| | | <wd-tab :title="`待生产(${total.wait})`" class="tab_bg"> |
| | | <ProductList |
| | | ref="waitRef" |
| | | :key="`wait-${searchKey}`" |
| | | :api="ManageApi.getProductList" |
| | | state="待完成" |
| | | :model="searchKeyword" |
| | | @ok="changeWait" |
| | | /> |
| | | </wd-tab> |
| | | <wd-tab :title="`部分完成(${total.partial})`" class="tab_bg"> |
| | | <ProductList |
| | | ref="partialRef" |
| | | :key="`partial-${searchKey}`" |
| | | :api="ManageApi.getProductList" |
| | | state="部分完成" |
| | | :model="searchKeyword" |
| | | @ok="changePartial" |
| | | /> |
| | | </wd-tab> |
| | | <wd-tab :title="`已生产(${total.already})`" class="tab_bg"> |
| | | <ProductList |
| | | ref="alreadyRef" |
| | | :key="`already-${searchKey}`" |
| | | :api="ManageApi.getProductList" |
| | | state="已完成" |
| | | :model="searchKeyword" |
| | | @ok="changeAlready" |
| | | /> |
| | | </wd-tab> |
| | |
| | | const toast = useToast(); |
| | | |
| | | const waitRef = ref(); |
| | | const partialRef = ref(); |
| | | const alreadyRef = ref(); |
| | | const tab = ref<number>(0); |
| | | const searchKeyword = ref(""); |
| | | const searchKey = ref(0); |
| | | const total = reactive({ |
| | | wait: 0, |
| | | partial: 0, |
| | | already: 0, |
| | | }); |
| | | |
| | |
| | | total.wait = num; |
| | | }; |
| | | |
| | | const changePartial = (num: number) => { |
| | | total.partial = num; |
| | | }; |
| | | |
| | | const changeAlready = (num: number) => { |
| | | total.already = num; |
| | | }; |
| | | |
| | | const handleSearch = () => { |
| | | searchKey.value++; |
| | | }; |
| | | |
| | | const handleClear = () => { |
| | | searchKeyword.value = ""; |
| | | handleSearch(); |
| | | }; |
| | | |
| | | const openScan = () => { |
| | | scanRef.value.triggerScan(); |
| | | }; |