| | |
| | | // 单丝领用扫码 |
| | | getScarn(params: any) { |
| | | return request<BaseResult<any>>({ |
| | | url: "/app/getScarn", |
| | | url: "/app/scarn", |
| | | method: "GET", |
| | | data: params, |
| | | }); |
| | |
| | | |
| | | // 登录表单数据 |
| | | const loginFormData = ref<LoginFormData>({ |
| | | // username: "31601016", |
| | | username: "32308027", |
| | | username: "31601016", |
| | | // username: "32308027", |
| | | password: "cxjt1234", |
| | | }); |
| | | |
| | |
| | | <wd-form :model="model"> |
| | | <wd-cell-group :border="true"> |
| | | <wd-input |
| | | v-model="model.no" |
| | | v-model="model.monofilamentNumber" |
| | | label="单丝编号" |
| | | label-width="100px" |
| | | prop="no" |
| | |
| | | placeholder="请输入单丝编号" |
| | | /> |
| | | <wd-input |
| | | v-model="model.length" |
| | | v-model="model.oneLength" |
| | | label="长度" |
| | | label-width="100px" |
| | | prop="length" |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import useFormData from "@/hooks/useFormData"; |
| | | |
| | | const { form: model } = useFormData({ |
| | | no: undefined, |
| | | length: undefined, |
| | | }); |
| | | const model: any = defineModel("value"); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | </template> |
| | | </CardTitle> |
| | | </template> |
| | | <MonofilCard v-for="(item, index) in cardList" :key="index" /> |
| | | <MonofilCard v-for="(item, index) in cardList" v-model:value="item" :key="index" /> |
| | | <template #bottom> |
| | | <view class="flex justify-center items-center"> |
| | | <wd-button block> |
| | |
| | | const message = useMessage(); |
| | | |
| | | const getScanCode = async (code: any) => { |
| | | let parseData = code.trim(); |
| | | console.log("自定义扫描的结果回调函数:", parseData); |
| | | let codeArr = parseData.split(","); |
| | | console.log("自定义扫描的结果回调函数:", code); |
| | | // let parseData = code.trim(); |
| | | let codeArr = code.code.split(","); |
| | | console.log("sb:", codeArr); |
| | | const { data } = await TwistApi.getScarn({ |
| | | outPutId: codeArr[1], |
| | | }); |
| | | console.log("单丝编号", data); |
| | | message.alert({ |
| | | title: "单丝编号", |
| | | msg: JSON.stringify(data), |
| | | }); |
| | | // console.log("单丝编号", data); |
| | | // message.alert({ |
| | | // title: "单丝编号", |
| | | // msg: JSON.stringify(data), |
| | | // }); |
| | | pagingRef.value.complete([data]); |
| | | }; |
| | | |
| | | const openScan = () => { |