xiaohaizhao 8 місяців тому
батько
коміт
22d27fec56

+ 2 - 26
pages.json

@@ -16,33 +16,9 @@
 			"path": "pages/index/index"
 		},
 		{
-			"path": "pages/workOrder/index"
-		},
-		{
-			"path": "pages/workOrder/detail",
-			"style": {
-				"navigationBarTitleText": "工单详情"
-			}
-		},
-		{
-			"path": "pages/workOrder/changeMsg",
-			"style": {
-				"navigationBarTitleText": "信息修改"
-			}
-		},
-		{
-			"path": "pages/select/product",
-			"style": {
-				"navigationBarTitleText": "选择产品"
-			}
-		},
-		{
-			"path": "pages/workOrder/work"
-		},
-		{
-			"path": "pages/select/accessories",
+			"path": "pages/bookingService/index",
 			"style": {
-				"navigationBarTitleText": "选择配件"
+				"navigationBarTitleText": "预约服务"
 			}
 		}
 	],

+ 117 - 88
pages/workOrder/changeMsg.vue → pages/bookingService/index.vue

@@ -1,9 +1,18 @@
 <template>
-    <view class="content"><!-- labelAlign="right" -->
+    <My-shade />
+    <view class="content">
+        <view class="title">
+            服务信息
+        </view>
         <up-form :model="form" labelWidth="70" ref="uFormRef">
-            <view class="title" style="margin-top: 0;">
-                服务信息
-            </view>
+            <up-form-item label="服务类型" :required="rules.servicetype[0].required" prop="servicetype">
+                <up-radio-group v-model="form.servicetype" @change="servicetypeChange">
+                    <up-radio :customStyle="{ marginLeft: '12px' }" v-for="(item) in servertypes" :key="item"
+                        :label="item" :name="item">
+                    </up-radio>
+                </up-radio-group>
+            </up-form-item>
+
             <up-form-item label="产品品类" :required="rules.class1[0].required" prop="class1">
                 <up-radio-group v-model="form.class1">
                     <up-radio :customStyle="{ marginLeft: '12px' }" v-for="(item) in class1" :key="item.value"
@@ -12,76 +21,80 @@
                 </up-radio-group>
             </up-form-item>
 
-            <up-form-item label="服务类型" :required="rules.servicetype[0].required" prop="servicetype">
-                <up-radio-group v-model="form.servicetype">
-                    <up-radio :customStyle="{ marginLeft: '12px' }" v-for="(item) in ['安装', '维修', '清洗']" :key="item"
-                        :label="item" :name="item">
+            <up-form-item v-if="rules.class2[0].required" label="故障类型" :required="rules.class2[0].required"
+                prop="class2">
+                <up-radio-group v-model="form.class2">
+                    <up-radio :customStyle="{ marginLeft: '12px' }" v-for="(item) in class2" :key="item.value"
+                        :label="item.value" :name="item.value">
                     </up-radio>
                 </up-radio-group>
             </up-form-item>
 
-            <up-form-item label="服务地址" :required="rules.province[0].required" prop="province">
-                <picker class="picker" mode="region" :value="[form.province, form.city, form.county]"
-                    @change="changeRegion">
-                    {{ [form.province, form.city, form.county].join("-") || '选择省市县' }}
-                </picker>
-            </up-form-item>
-
-            <view style="margin-top: -30rpx;">
-                <up-form-item label="" prop="address">
-                    <up-textarea v-model="form.address" placeholder="详细地址" autoHeight height="20" />
-                </up-form-item>
-            </view>
-
-            <up-form-item label="联系人" :required="rules.scenecontact[0].required" prop="scenecontact">
-                <up-input v-model="form.scenecontact" placeholder="联系人" clearable />
-            </up-form-item>
-
-            <up-form-item label="联系人电话" :required="rules.scenecontactphonenumber[0].required"
-                prop="scenecontactphonenumber">
-                <up-input type="number" v-model="form.scenecontactphonenumber" placeholder="联系人电话" clearable />
-            </up-form-item>
-
             <view class="title">
                 产品信息
             </view>
 
             <up-form-item label="序列号" :required="rules.sku[0].required" prop="sku">
-                <up-input v-model="form.sku" :disabled="detail.sku" placeholder="序列号" clearable @blur="skuConfirm">
+                <up-input v-model="form.sku" placeholder="序列号" clearable @blur="skuConfirm">
                     <template #suffix>
-                        <up-icon v-if="!detail.sku" name="scan" color="#2979ff" size="28" @click="openScan" />
+                        <view style="display: flex;align-items: center;">
+                            <view class="my-but" hover-class="navigator-hover">
+                                选择产品
+                            </view>
+                            <up-icon name="scan" color="#2979ff" size="28" @click="openScan" />
+                        </view>
                     </template>
                 </up-input>
             </up-form-item>
+
             <up-form-item label="产品名称" prop="itemname">
-                <up-input v-model="form.itemname" disabled placeholder="选择产品">
-                    <!-- <template #suffix>
-                        <up-button v-if="!disabled" type="success" size="mini" text="选择产品" @click="toSelectProduct" />
-                    </template> -->
+                <up-input v-model="form.itemname" disabled placeholder="请输入序列号或选择产品">
+                    <template #suffix>
+                        <view style="display: flex;align-items: center;">
+                            <view class="my-but" hover-class="navigator-hover">
+                                选择产品
+                            </view>
+                        </view>
+                    </template>
                 </up-input>
             </up-form-item>
 
+            <up-form-item label="产品编号" prop="itemno">
+                <up-input v-model="form.itemno" disabled placeholder="请输入序列号或选择产品" />
+            </up-form-item>
+
             <up-form-item label="产品型号" prop="model">
-                <up-input v-model="form.model" disabled placeholder="型号" />
+                <up-input v-model="form.model" disabled placeholder="请输入序列号或选择产品" />
             </up-form-item>
+            <up-form-item label="保修卡号" prop="cardno">
+                <up-input v-model="form.cardno" disabled placeholder="请输入序列号或选择产品" />
+            </up-form-item>
+
+            <view class="title">
+                联系人信息
+            </view>
 
-            <up-form-item label="经销商" prop="serviceenterprisename">
-                <up-textarea v-model="form.serviceenterprisename" disabled placeholder="经销商" autoHeight height="20" />
+            <up-form-item label="联系人" :required="rules.scenecontact[0].required" prop="scenecontact">
+                <up-input v-model="form.scenecontact" placeholder="联系人" clearable />
             </up-form-item>
-            <up-form-item label="客户名称" prop="contact">
-                <up-input v-model="form.contact" disabled placeholder="客户名称" />
+
+            <up-form-item label="手机号" :required="rules.scenecontactphonenumber[0].required"
+                prop="scenecontactphonenumber">
+                <up-input type="number" v-model="form.scenecontactphonenumber" placeholder="联系人电话" clearable />
             </up-form-item>
-            <up-form-item label="客户电话" prop="phonenumber">
-                <up-input v-model="form.phonenumber" :disabled="detail.sku" placeholder="客户电话">
-                    <template #suffix>
-                        <up-button v-if="!detail.sku" type="success" :disabled="!form.phonenumber" size="mini" text="查询"
-                            @click="phonenumberConfirm" />
-                    </template>
-                </up-input>
+
+
+            <up-form-item label="省市县" :required="rules.province[0].required" prop="province">
+                <picker class="picker" mode="region" :value="[form.province, form.city, form.county]"
+                    @change="changeRegion">
+                    {{ [form.province, form.city, form.county].join("-") || '选择省市县' }}
+                </picker>
             </up-form-item>
-            <up-form-item label="保修卡号" prop="cardno">
-                <up-input v-model="form.cardno" disabled placeholder="保修卡号" />
+
+            <up-form-item label="详细地址" prop="address">
+                <up-textarea maxlength="499" v-model="form.address" placeholder="详细地址" autoHeight height="20" />
             </up-form-item>
+
         </up-form>
         <view style="padding-bottom: 50px;width: 350rpx;margin: 40rpx auto 0;" @click="save">
             <My-button text="保存" :loading="loading" />
@@ -121,55 +134,74 @@
 <script setup>
 import { ref, reactive, getCurrentInstance } from 'vue';
 const { $Http } = getCurrentInstance().proxy;
-import { onLoad } from '@dcloudio/uni-app';
+import { onShow } from '@dcloudio/uni-app';
 
 const uFormRef = ref(null);
 const form = reactive({
-    class1: '', // 产品品类
+    sa_serviceorderid: 0,
     servicetype: '', // 服务类型
-    address: "", // 详细地址
-    province: '', // 省份
-    city: '', // 城市
-    county: '', // 区县
+    class1: '', // 产品品类
+    class2: '', // 故障类型
+    sku: '', // 序列号
+    itemname: '', // 产品名称
+    itemno: '', // 产品编号
+    model: '', // 产品型号
+    cardno: '', // 保修卡号
+
     scenecontact: '', // 联系人
     scenecontactphonenumber: '', // 联系人电话
-    sku: '', // 序列号
-    'contact': "", // 客户名称
-    'itemid': "", //    产品ID
-    'itemname': "", // 产品名称
-    'itemno': "", // 产品编号
-    'model': "", // 型号
-    'phonenumber': "", // 客户电话
-    'unitname': "", // 计量单位
-    'spec': "", // 规格
-    serviceenterprisename: "", //  经销商
-    cardno: "" // 保修卡号
+
+    province: '', // 省
+    city: '', // 市
+    county: '', // 县
+
+    address: '', // 详细地址
 });
+
+
 const rules = reactive({
-    class1: [{ required: true, message: '请选择产品品类', trigger: 'change' }],
     servicetype: [{ required: true, message: '请选择服务类型', trigger: 'change' }],
+    class1: [{ required: true, message: '请选择产品品类', trigger: 'change' }],
+    class2: [{ required: false, message: "请选择故障类型", trigger: 'change' }],
+    sku: [{ required: false, message: '请输入序列号', trigger: 'blur' }],
+    itemno: [{ required: false, message: '请输入产品编号', trigger: 'blur' }],
+    itemname: [{ required: true, message: '请输入产品名称', trigger: 'blur' }],
+    model: [{ required: false, message: '请输入产品型号', trigger: 'blur' }],
+    cardno: [{ required: false, message: '请输入保修卡号', trigger: 'blur' }],
     province: [{ required: true, message: '请选择省市县', trigger: 'change' }],
     address: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
     scenecontact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
-    sku: [{ required: true, message: '请输入序列号', trigger: 'blur' }],
     scenecontactphonenumber: [{ required: true, message: '请输入联系人电话', trigger: 'blur', pattern: /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/, message: '请输入正确的手机号码' }],
 });
 
-const class1 = ref(''); // 产品品类
+const class1 = ref(''),
+    servertypes = ref(['安装', '维修', '清洗']),
+    class2 = ref('');
 
 let sa_workorderid = 0;
 
-onLoad((options) => {
-    sa_workorderid = options.id;
-    getDetail()
+onShow(() => {
+    $Http.getClass('servertype').then(res => {
+        servertypes.value = res.data.map(v => v.value);
+        if (res.code !== 1) return uni.showToast({ title: res.msg, icon: 'none' });
+    });
+
     $Http.getClass('prodclass1').then(res => {
-        uFormRef.value.setRules(rules);
         class1.value = res.data;
         if (res.code !== 1) return uni.showToast({ title: res.msg, icon: 'none' });
     });
+
+    $Http.getClass('faulttype').then(res => {
+        class2.value = res.data;
+        if (res.code !== 1) return uni.showToast({ title: res.msg, icon: 'none' });
+    });
 });
 
-let detail = reactive({});
+function servicetypeChange(type) {
+    rules.class2[0].required = type == '维修';
+    rules.sku[0].required = type == '安装';
+    uFormRef.value.setRules(rules);
+}
 
 // 保存
 let loading = ref(false);
@@ -204,19 +236,6 @@ function save() {
     })
 }
 let disabled = ref(false);
-function getDetail() {
-    $Http.basic({ "id": "20230208140103", "content": { "nocache": true, sa_workorderid } }).then(res => {
-        console.log("工单详情", res)
-        if (res.code !== 1) return uni.showToast({ title: res.msg, icon: 'none' });
-        detail = reactive(res.data);
-        for (const key in form) {
-            if (detail[key] !== undefined) {
-                form[key] = detail[key];
-            }
-        }
-        disabled.value = detail.item ? true : false
-    })
-}
 
 function changeRegion(e) {
     form.province = e.detail.value[0];
@@ -400,4 +419,14 @@ function toSelectProduct() {
         margin-top: 8rpx;
     }
 }
+
+.my-but {
+    line-height: 44rpx;
+    padding: 0 20rpx;
+    background: #2979ff;
+    color: #fff;
+    border-radius: 8rpx;
+    margin-right: 10rpx;
+    font-size: 24rpx;
+}
 </style>

+ 2 - 2
pages/index/home.vue

@@ -4,7 +4,7 @@
 		<view class="image-box">
 			<image style="width: 100vw;" src="/static/image/banner.png" mode="widthFix" />
 			<view class="main">
-				<view class="item" hover-class="navigator-hover">
+				<navigator url="/pages/bookingService/index" class="item" hover-class="navigator-hover">
 					<view class="icon">
 						<image class="image" src="/static/image/wx.png" />
 					</view>
@@ -14,7 +14,7 @@
 					<view class="text">
 						故障维修排除
 					</view>
-				</view>
+				</navigator>
 				<view class="item" hover-class="navigator-hover">
 					<view class="icon">
 						<image class="image" src="/static/image/qt.png" />

+ 0 - 340
pages/select/accessories.vue

@@ -1,340 +0,0 @@
-<template>
-    <block v-if="!isBom">
-        <view class="search-box">
-            <up-search placeholder="搜索关键词" v-model="keyword" height="35" @blur="onSearch" :clearabled="false"
-                :showAction="false" />
-            <view v-if="content.where.condition" class="clear" @click.stop="onSearch('')">
-                <up-icon name="close-circle-fill" size="20" />
-            </view>
-        </view>
-        <view style="height: 20rpx;" />
-    </block>
-
-    <My_listbox v-if="!isBom" ref="listBox" :empty="!list.length" :pullDown="!isBom" @getlist="getList">
-        <showList :result="resultIds" :list='list' @onClick="onSelect" />
-        <view style="height: 200rpx;" />
-    </My_listbox>
-
-    <view v-else-if="bomList.length" class="bom">
-        <view class="left">
-            <view class="class1" :class="active.class1 == index ? 'class1active' : ''" @click="changeClass1(index)"
-                v-for="(item, index) in bomList" :key="item.plm_bomid" hover-class="navigator-hover">
-                {{ item.bomname }}
-            </view>
-        </view>
-
-        <view class="right">
-            <My_listbox ref="listBox" :pullDown="false">
-                <up-collapse :value="collapse1" @change="changeCollapse1($event)">
-                    <up-collapse-item :ref="el => {
-                        if (el) {
-                            collapseRefs['collapse' + item.plm_bomid] = el
-                        }
-                    }" :cellCustomStyle="{
-                        backgroundColor: '#fff',
-                    }" v-for="item in bomList[active.class1].subdep" :key="item.plm_bomid" :title="item.bomname"
-                        :name="item.plm_bomid">
-                        <up-collapse @change="changeCollapse($event, item.plm_bomid)" v-if="item.subdep.length"
-                            :name="item.plm_bomid">
-                            <up-collapse-item :cellCustomStyle="{
-                                backgroundColor: '#fff',
-                            }" :ref="el => {
-                                if (el) {
-                                    collapseRefs['collapse' + item.plm_bomid] = el
-                                }
-                            }" v-for="item1 in item.subdep" :key="item1.plm_bomid" :title="item1.bomname"
-                                :name="item1.plm_bomid">
-                                <showList v-if="item1.items.length" size="small" :result="resultIds" :list='item1.items'
-                                    @onClick="onSelect" />
-                            </up-collapse-item>
-                        </up-collapse>
-
-                        <showList v-if="item.items.length" size="small" :result="resultIds" :list='item.items'
-                            @onClick="onSelect" />
-                    </up-collapse-item>
-                </up-collapse>
-                <view style="height: 200rpx;" />
-            </My_listbox>
-        </view>
-    </view>
-
-    <My_listbox v-else ref="listBox" :empty="true" @getlist="getBomList" />
-    <view class="footer">
-        <My-button :text="`确定添加(${resultIds.length})`" @onClick="onAdd" />
-    </view>
-</template>
-
-<script setup>
-import { ref, reactive, getCurrentInstance, nextTick } from 'vue';
-import { onLoad } from '@dcloudio/uni-app';
-import showList from "./accessoriesList.vue"
-const { $Http } = getCurrentInstance().proxy;
-
-const listBox = ref(null);
-const isBom = ref(false);
-let result = reactive([]);
-const resultIds = ref([]);
-
-const content = reactive({
-    loading: false,
-    "pageNumber": 1,
-    "pageSize": 20,
-    "where": {
-        "condition": ""
-    }
-})
-
-function onAdd() {
-    $Http.selectAcc(result)
-}
-
-function onSelect(e) {
-    if (result.some(item => item.itemid == e.itemid)) {
-        result = result.filter(item => item.itemid != e.itemid);
-    } else {
-        result.push(e);
-    }
-    resultIds.value = result.map(item => item.itemid);
-}
-
-const list = ref([]);
-
-onLoad((options) => {
-    console.log("options", options)
-    console.log("$Http", $Http)
-
-    result = result.concat(JSON.parse(options.list || '[]'));
-    resultIds.value = result.map(item => item.itemid);
-    console.log("初始选中", result, resultIds.value)
-    let content1 = $Http.content1;
-    content.sys_enterpriseid = content1.sys_enterpriseid;
-    content.sa_workorderid = content1.sa_workorderid;
-
-    if (content1.sku) $Http.basic({
-        "id": 2025080610424703,
-        "content": content1
-    }).then(res => {
-        console.log("查询产品是否存在BOM", res)
-        if (res.data == 0) {
-            // 不存在BOM
-            getList(true);
-        } else {
-            // 存在BOM
-            isBom.value = true;
-            getBomList();
-        }
-    })
-})
-
-const bomList = ref([]);
-
-let active = reactive({
-    class1: 0
-});
-
-function changeClass1(index) {
-    active.class1 = index;
-}
-
-// 折叠面板
-const collapseRefs = ref({})
-const collapse1 = ref([])
-
-function changeCollapse1(e) {
-    collapse1.value = e.filter(v => v.status == 'open').map(v => v.name)
-}
-
-function changeCollapse(e, id) {
-    nextTick(() => {
-        collapseRefs.value['collapse' + id].init()
-    });
-    setTimeout(() => {
-        nextTick(() => {
-            collapseRefs.value['collapse' + id].init()
-        });
-    }, 330);
-}
-
-// 有bom
-function getBomList() {
-    $Http.basic({
-        "id": "2025080610425503",
-        content: {
-            "sa_aftersalesbomid": content.sa_workorderid,
-            "sys_enterpriseid": content.sys_enterpriseid,
-        }
-    }).then(res => {
-        console.log("获取bom配件列表", res)
-        listBox.value.refreshToComplete();
-        listBox.value.setHeight();
-        if (res.code == 1) {
-            bomList.value = processBomData(res.data)
-            console.log("bomList", bomList.value);
-        } else {
-            if (res.msg) uni.showToast({
-                title: res.msg,
-                icon: 'none'
-            });
-        }
-    })
-}
-
-function processBomData(originalData) {
-    // 1. 提取所有一级分类节点
-    const topLevelNodes = [];
-
-    // 遍历原始数据
-    originalData.forEach(dataSet => {
-        dataSet.bom?.forEach(rootNode => {
-            // 提取根节点下的一级分类
-            if (rootNode.subdep && rootNode.subdep.length > 0) {
-                topLevelNodes.push(...rootNode.subdep);
-            }
-        });
-    });
-
-    // 2. 递归处理节点
-    const processNode = (node) => {
-        node.items = node.items || [];
-        node.subdep = node.subdep || [];
-        // 如果当前节点没有items和subdep,直接返回null
-        if (node.items.length === 0 && node.subdep.length === 0) return null;
-
-        try {
-            if (node.items.length) node.items = node.items.map(item => {
-                item.imageUrl = item.attinfos.length ? $Http.getSpecifiedImage(item.attinfos[0]) : ''
-                return item;
-            });
-        } catch (error) {
-
-        }
-        // 创建新节点副本
-        const newNode = { ...node };
-        // 处理子节点
-        if (node.subdep.length) newNode.subdep = node.subdep.map(subNode => processNode(subNode)).filter(subNode => subNode !== null);
-        return newNode;
-    };
-
-    // 3. 处理所有一级分类节点
-    return topLevelNodes.map(node => processNode(node)).filter(node => node && (node.subdep.length || node.items.length));
-}
-
-
-// 无BOM
-
-const keyword = ref('');
-
-function onSearch(e) {
-    if (content.where.condition == e) return;
-    content.where.condition = e;
-    keyword.value = e;
-    getList(true);
-}
-
-function getList(init = false) {
-    if (isBom.value) return;
-    if (content.loading) return;
-    if (init) content.pageNumber = 1;
-    content.loading = true;
-    $Http.basic({
-        "id": "2025080610425103",
-        content
-    }).then(res => {
-        console.log("获取配件列表", res)
-        content.loading = false;
-        listBox.value.refreshToComplete();
-        listBox.value.setHeight();
-        res.data = res.data.map(item => {
-            item.imageUrl = item.attinfos.length ? $Http.getSpecifiedImage(item.attinfos[0]) : ''
-            return item;
-        });
-        if (res.code == 1) {
-            list.value = reactive(res.firstPage ? res.data : list.value.concat(res.data));
-            content.pageTotal = res.pageTotal;
-            content.pageNumber = res.pageNumber;
-        } else {
-            if (res.msg) uni.showToast({
-                title: res.msg,
-                icon: 'none'
-            });
-        }
-    })
-}
-</script>
-
-<style lang="scss" scoped>
-.bom {
-    width: 100vw;
-    display: flex;
-    min-height: 100vh;
-
-    .left {
-        width: 250rpx;
-        background: #fff;
-        flex-shrink: 0;
-
-        .class1 {
-            padding: 30rpx 30rpx;
-            width: 250rpx;
-            box-sizing: border-box;
-            background: #FFFFFF;
-            border-radius: 0rpx 8rpx 0rpx 0rpx;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 28rpx;
-            color: #999999;
-        }
-
-        .class1active {
-            position: relative;
-            background: #F7F7FF;
-            color: #3774F6;
-        }
-
-        .class1active::after {
-            content: '';
-            position: absolute;
-            left: 0;
-            top: 0;
-            width: 8rpx;
-            height: 100%;
-            background: #3774F6;
-        }
-    }
-
-    .right {
-        flex: 1;
-
-
-    }
-}
-
-.search-box {
-    position: relative;
-    padding: 20rpx;
-    background: #fff;
-
-    .clear {
-        position: absolute;
-        display: flex;
-        align-items: center;
-        right: 0;
-        top: 50%;
-        transform: translateY(-50%);
-        width: 80rpx;
-        padding-left: 10rpx;
-        height: 70rpx;
-        z-index: 2;
-    }
-}
-
-.footer {
-    position: fixed;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    height: 120rpx;
-    padding: 10rpx 20rpx;
-    background: #fff;
-    box-sizing: border-box;
-}
-</style>

+ 0 - 161
pages/select/accessoriesList.vue

@@ -1,161 +0,0 @@
-<template>
-    <view :class="size">
-        <view v-for="item in list" :key="item.itemid" hover-class="navigator-hover" class="item"
-            :class="result.includes(item.itemid) ? 'radio' : ''" @click="click(item)">
-            <view class="left" @click.stop="previewImge(item.imageUrl)">
-                <up-image :show-loading="true" :src="item.imageUrl" width="100%" height="100%" />
-            </view>
-            <view class="right">
-                <view class="itemname">
-                    {{ item.itemname || '--' }}
-                </view>
-                <view class="row">
-                    型号:{{ item.model || '--' }}
-                </view>
-                <view class="row">
-                    分类:{{ item.bomfullname || '--' }}
-                </view>
-                <view class="row">
-                    售价:<text class="price">{{ item.price }}</text>
-                </view>
-            </view>
-        </view>
-    </view>
-</template>
-
-<script setup>
-import { defineProps, defineEmits } from 'vue';
-const emit = defineEmits(['uploadCallback'])
-
-const props = defineProps({
-    list: {
-        type: Array
-    },
-    result: {
-        type: Array,
-        default: () => []
-    },
-    onClick: {
-        type: Function,
-        default: () => { }
-    },
-    size: {
-        type: String,
-        default: 'large' // small, large
-    }
-});
-
-function click(item) {
-    emit('onClick', item);
-}
-
-function previewImge(url) {
-    if (!url) return;
-    uni.previewImage({
-        urls: [url],
-        current: url
-    });
-}
-</script>
-
-<style lang="scss" scoped>
-.item {
-    display: flex;
-    width: 100%;
-    background: #FFFFFF;
-    border-radius: 20rpx;
-    padding: 16rpx;
-    box-sizing: border-box;
-    margin-top: 16rpx;
-
-    .left {
-        flex-shrink: 0;
-        width: 148rpx;
-        height: 148rpx;
-        background: #FFFFFF;
-        border-radius: 8rpx;
-        border: 2rpx solid #707070;
-        margin-right: 16rpx;
-        overflow: hidden;
-    }
-
-    .right {
-        right: 1;
-
-        .itemname {
-            line-height: 34rpx;
-            font-family: PingFang SC, PingFang SC;
-            font-weight: bold;
-            font-size: 24rpx;
-            color: #333333;
-        }
-
-        .row {
-            line-height: 28rpx;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 20rpx;
-            color: #999999;
-
-            .price {
-                color: #FA5151;
-            }
-        }
-
-    }
-}
-
-.large {
-    width: 690rpx;
-    margin: 0 auto;
-
-    .item {
-        padding: 20rpx;
-        margin-top: 20rpx;
-
-        .left {
-            width: 180rpx;
-            height: 180rpx;
-            background: #FFFFFF;
-            margin-right: 20rpx;
-        }
-
-        .right {
-
-            .itemname {
-                line-height: 38rpx;
-                font-size: 34rpx;
-            }
-
-            .row {
-                font-size: 28rpx;
-                margin-top: 12rpx;
-            }
-
-        }
-    }
-}
-
-.radio {
-    background: #3774F6;
-
-    .right {
-        right: 1;
-
-        .itemname {
-            color: #fff;
-        }
-
-        .row {
-            color: #fff;
-
-            .price {
-                color: #fff;
-            }
-        }
-    }
-}
-
-.item:first-child {
-    margin-top: 0;
-}
-</style>

+ 0 - 153
pages/select/product.vue

@@ -1,153 +0,0 @@
-<template>
-    <view class="search-box">
-        <up-search placeholder="搜索关键词" v-model="keyword" height="35" @blur="onSearch" :clearabled="false"
-            :showAction="false" />
-        <view v-if="content.where.condition" class="clear" @click.stop="onSearch('')">
-            <up-icon name="close-circle-fill" size="20" />
-        </view>
-    </view>
-    <view style="height: 20rpx; " />
-    <My_listbox ref="listBox" :empty="!list.length" @getlist="getList">
-        <view class="item" hover-class="navigator-hover" v-for="item in list" :key="item.itemid"
-            @click="selected(item)">
-            <view class="itemname">{{ item.itemname }}</view>
-            <view class="row">
-                <view class="label">
-                    产品编号:
-                </view>
-                <view class="value">
-                    {{ item.itemno || '--' }}
-                </view>
-            </view>
-            <view class="row">
-                <view class="label">
-                    型号/规格:
-                </view>
-                <view class="value">
-                    {{ item.model }}/{{ item.spec || '--' }}
-                </view>
-            </view>
-            <view class="row">
-                <view class="label">
-                    计量单位:
-                </view>
-                <view class="value">
-                    {{ item.unitname || '--' }}
-                </view>
-            </view>
-        </view>
-    </My_listbox>
-</template>
-
-<script setup>
-import { ref, reactive, getCurrentInstance } from 'vue';
-const { $Http } = getCurrentInstance().proxy;
-import { onLoad } from '@dcloudio/uni-app';
-
-const keyword = ref('');
-const listBox = ref(null);
-const content = reactive({
-    loading: false,
-    "pageNumber": 1,
-    "pageSize": 20,
-    "where": {
-        "status": '',
-        "condition": ""
-    }
-});
-
-function onSearch(e) {
-    if (content.where.condition == e) return;
-    content.where.condition = e;
-    keyword.value = e;
-    getList(true);
-}
-const list = ref([])
-
-onLoad(() => {
-    getList();
-});
-
-function getList(init = false) {
-    if (content.loading) return;
-    content.loading = true;
-    if (init) content.pageNumber = 1;
-    $Http.basic({
-        "id": "20220923140602",
-        content
-    }).then(res => {
-        content.loading = false;
-        console.log("获取产品列表", res)
-        listBox.value.refreshToComplete();
-        listBox.value.setHeight();
-        if (res.code == 1) {
-            list.value = reactive(res.firstPage ? res.data : list.value.concat(res.data));
-            content.pageTotal = res.pageTotal;
-            content.pageNumber = res.pageNumber;
-        } else {
-            if (res.msg) uni.showToast({
-                title: res.msg,
-                icon: 'none'
-            });
-        }
-    })
-}
-
-function selected(item) {
-    $Http.onSelected && $Http.onSelected(item)
-}
-</script>
-
-<style lang="scss" scoped>
-.search-box {
-    position: relative;
-    padding: 20rpx;
-    background: #fff;
-
-    .clear {
-        position: absolute;
-        display: flex;
-        align-items: center;
-        right: 0;
-        top: 50%;
-        transform: translateY(-50%);
-        width: 80rpx;
-        padding-left: 10rpx;
-        height: 70rpx;
-        z-index: 2;
-    }
-}
-
-.item {
-    width: 690rpx;
-    background: #FFFFFF;
-    box-shadow: 0rpx 4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
-    border-radius: 10rpx;
-    padding: 40rpx;
-    box-sizing: border-box;
-    margin: 0 auto 20rpx;
-
-    .itemname {
-        line-height: 38rpx;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-size: 32rpx;
-        color: #333333;
-    }
-
-    .row {
-        display: flex;
-        line-height: 32rpx;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-size: 28rpx;
-        margin-top: 20rpx;
-
-        .label {
-            color: #999999;
-        }
-
-        .value {
-            color: #333333;
-        }
-    }
-}
-</style>

+ 0 - 469
pages/workOrder/detail.vue

@@ -1,469 +0,0 @@
-<template>
-    <view v-if="time">
-        <view style="background-color: #fff;padding: 20rpx 0;">
-            <up-steps :current="current" dot activeColor="#0279FE">
-                <up-steps-item v-for="item in steps" :key="item.title" :title="item.title" />
-            </up-steps>
-        </view>
-        <view class="main">
-            <view class="billno" style="margin-bottom: -24rpx;">
-                工单编号:{{ detail.billno }}
-            </view>
-            <view class="row">
-                <view class="label col-center">服务类型</view>
-                <view class="servicetype"
-                    :style="{ 'background': { '安装': '#70B603', '维修': '#D9001B', '清洁': '#3874F6', '清洗': '#3874F6' }[detail.servicetype] || '#999999' }">
-                    {{ detail.servicetype || '--' }}</view>
-            </view>
-            <view class="row">
-                <view class="label">产品品类</view>
-                <view class="value">{{ detail.class1 || '--' }}</view>
-            </view>
-            <view class="row" v-if="detail.servicetype == '维修'">
-                <view class="label">故障类型</view>
-                <view class="value">{{ detail.reason || '--' }}</view>
-            </view>
-            <view class="row">
-                <view class="label">服务地址</view>
-                <view class="value">{{ detail.province + detail.city + detail.county + detail.address || '--' }}</view>
-            </view>
-            <view class="row" style="align-items: center;">
-                <view class="label justify">联系人</view>
-                <view class="value phonenumber">{{ detail.scenecontact || '--' }}
-                    <block v-if="detail.scenecontactphonenumber">
-                        <text style="margin: 0 20rpx 0 10rpx;">
-                            {{ detail.scenecontactphonenumber }}
-                        </text>
-                        <My-button :customStyle="{
-                            width: '142rpx',
-                            height: '48rpx',
-                            'background-color': '#FFFFFF',
-                            'color': '#3874F6',
-                            borderRadius: '10rpx'
-                        }" :frontIconStyle="{
-                            marginRight: '6rpx',
-                        }" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="detail.scenecontactphonenumber" />
-                    </block>
-                </view>
-            </view>
-            <view class="row">
-                <view class="label">派单日期</view>
-                <view class="value">{{ detail.createdate || '--' }}</view>
-            </view>
-            <view class="row">
-                <view class="label">服务需求</view>
-                <view class="value">{{ detail.remarks || '--' }}</view>
-            </view>
-            <up-transition :show="transition">
-                <view class="transition">
-                    <up-divider />
-                    <view class="row" v-if="detail.enterprisename">
-                        <view class="label justify">销售商</view>
-                        <view class="value">{{ detail.enterprisename || '--' }}</view>
-                    </view>
-                    <view class="row" v-if="detail.itemsText.length">
-                        <view class="label">产品信息</view>
-                        <view class="value">
-                            <view class="col-center" v-for="(item, index) in detail.itemsText" :key="index">
-                                <view class="value"><text v-if="detail.itemsText.length != 1">{{ index + 1 }}. </text>{{
-                                    item }}
-                                </view>
-                            </view>
-                        </view>
-                    </view>
-                    <view class="row" v-if="detail.sku">
-                        <view class="label justify">序列号</view>
-                        <view class="value">{{ detail.sku || '--' }}</view>
-                    </view>
-                    <view class="row" v-if="detail.customername || detail.customerphonenumber"
-                        style="align-items: center;">
-                        <view class="label justify">客户信息</view>
-                        <view class="value phonenumber">{{ detail.customername || '' }}
-                            <block v-if="detail.customerphonenumber">
-                                <text style="margin: 0 20rpx 0 10rpx;">
-                                    {{ detail.customerphonenumber }}
-                                </text>
-                                <My-button :customStyle="{
-                                    width: '142rpx',
-                                    height: '48rpx',
-                                    'background-color': '#FFFFFF',
-                                    'color': '#3874F6',
-                                    borderRadius: '10rpx'
-                                }" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="detail.customerphonenumber" />
-                            </block>
-                        </view>
-                    </view>
-                    <view class="row" v-if="detail.servicetype !== '安装' && detail.cardno">
-                        <view class="label">保修信息</view>
-                        <view class="value">
-                            <text :style="{ color: detail.inqualityguaranteeperiod ? '#70B603' : '#D9001B' }"
-                                style="margin-right: 0rpx;">
-                                {{ detail.inqualityguaranteeperiod ? '在保' : '已过保' }}
-                            </text>
-                            {{ detail.cardno || '' }}
-                            <view v-if="detail.cardno" style="margin-top: 20rpx;">
-                                {{ item.begdate || '' }} - {{ item.enddate || '' }}
-                            </view>
-                        </view>
-                    </view>
-                </view>
-            </up-transition>
-            <block v-if="detail.status == '进行中'">
-                <view style="height: 40rpx;" />
-                <view class="changeTransition" hover-class="navigator-hover" @click="transition = !transition">
-                    详细信息
-                    <view class="iconfont icon-dianjizhankai" :class="transition ? 'shrink' : ''" />
-                </view>
-            </block>
-            <!-- 底部按钮 -->
-            <view v-if="detail.status == '待接单'" class="but-box">
-                <view class="but-box-item" v-if="detail.customerphonenumber">
-                    <My-button :customStyle="{
-                        'background-color': '#FFFFFF',
-                        'color': '#3874F6',
-                    }" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="detail.customerphonenumber" />
-                </view>
-                <view class="but-box-item" @click="takeOrderShow = true">
-                    <My-button frontIcon="icon-dianhua" text="接单" />
-                    <up-modal negativeTop="100" :show="takeOrderShow" title="是否确认接单?" showCancelButton
-                        @confirm="takeOrders" @cancel="takeOrderShow = false" ref="uModal"
-                        :asyncClose="true"></up-modal>
-                </view>
-            </view>
-            <!-- 底部按钮 -->
-            <view v-else-if="detail.status == '待开始'" class="but-box">
-                <view class="but-box-item" @click="toChangeMsg">
-                    <My-button :customStyle="{
-                        'background-color': '#FFFFFF',
-                        'color': '#3874F6',
-                    }" text="信息修改" />
-                </view>
-                <view class="but-box-item" @click="confirmStartShow = true">
-                    <My-button text="确认开始" />
-                    <up-modal negativeTop="100" :show="confirmStartShow" showCancelButton @confirm="confirmStart"
-                        @cancel="confirmStartShow = false" ref="uModal" :asyncClose="true">
-                        <view class="slot-content">
-                            <view>
-                                请仔细核对服务信息和客户信息
-                            </view>
-                            <view style="margin-top: 20rpx;">
-                                开始工单后确认信息将不可修改!
-                            </view>
-                        </view>
-                    </up-modal>
-                </view>
-            </view>
-        </view>
-
-        <view class="main" v-if="current >= 2 && detail.nodes.length" style="padding: 30rpx;">
-            <nodes ref="Nodes" :nodes="detail.nodes" />
-            <view v-if="detail.status == '进行中'" style='width: 60%;margin: 40rpx auto 0;padding-bottom: 30rpx;'
-                @click="submit"><My-button text="完工提交" />
-            </view>
-        </view>
-
-    </view>
-
-    <view style="height: 50px;" />
-</template>
-
-<script setup>
-import { ref, reactive, getCurrentInstance } from 'vue';
-const { $Http } = getCurrentInstance().proxy;
-import { onLoad, onShow, onUnload } from '@dcloudio/uni-app';
-import nodes from './modules/nodes.vue';
-
-const transition = ref(true);
-const Nodes = ref(null);
-
-const current = ref(-1);
-const steps = reactive([
-    { title: '接单', value: '待接单' },
-    { title: '开始', value: '待开始' },
-    { title: '进行中', value: '进行中' },
-    { title: '提交', value: '提交' },
-    { title: '完工', value: '已完成' }
-]);
-let sa_workorderid = 0;
-onLoad((options) => {
-    sa_workorderid = options.id;
-});
-
-onUnload(() => {
-    delete $Http.content1
-});
-
-const time = ref(new Date().getTime());
-
-onShow(() => {
-    getDetail()
-})
-
-let detail = reactive({
-    itemsText: [],
-    servicetype: ""
-});
-
-function getDetail() {
-    $Http.basic({ "id": "20230208140103", "content": { "nocache": true, sa_workorderid } }).then(res => {
-        console.log("工单详情", res)
-        $Http.content1 = {
-            itemid: res.data.itemid,
-            sku: res.data.sku,
-            sys_enterpriseid: res.data.sys_enterpriseid,
-            sa_workorderid: res.data.sa_workorderid,
-        }
-        if (res.code !== 1) return uni.showToast({ title: res.msg, icon: 'none' });
-        try {
-            res.data.itemsText = res.data.titems.map(item => {
-                return `${item.itemname} ${item.model}`;
-            })
-        } catch (error) {
-
-        }
-        if (res.data.status == '进行中' && detail.servicetype == '') transition.value = false;
-        time.value = new Date().getTime()
-        detail = reactive(res.data);
-        current.value = steps.findIndex(item => item.value === res.data.status);
-    })
-}
-
-// 提交工单
-function submit() {
-    // 收集所有必填末级节点
-    const requiredLeafNodes = [];
-
-    // 递归查找末级节点
-    function findLeafNodes(nodeList) {
-        for (const node of nodeList) {
-            // 检查是否为末级节点(没有子节点)
-            if (!node.child || node.child.length === 0) {
-                // 检查是否是必填节点(required == 11)
-                if (node.workpresetjson?.required == 11 && node.status !== "1") {
-                    requiredLeafNodes.push(node);
-                }
-            } else {
-                // 递归检查子节点
-                findLeafNodes(node.child);
-            }
-        }
-    }
-    // 开始查找
-    findLeafNodes(detail.nodes);
-    // 检查所有必填末级节点是否已完成
-    const allCompleted = requiredLeafNodes.every(node => node.status === "1");
-    if (allCompleted) {
-        uni.showModal({
-            confirmText: '继续提交',
-            content: '请确认工单内容,提交后不可修改!',
-            success: ({ confirm }) => {
-                if (confirm) {
-                    $Http.basic({
-                        id: 2025072315401603,
-                        "content": {
-                            "sa_workorderid": detail.sa_workorderid
-                        }
-                    }).then(res => {
-                        console.log("提交结果", res)
-                        uni.showToast({
-                            title: res.code == 1 ? '提交成功' : res.msg,
-                            icon: 'none'
-                        });
-                        if (res.code == 1) getDetail();
-                    })
-                }
-            },
-        })
-    } else {
-        uni.showModal({
-            confirmText: '关闭',
-            content: '还有工序未完成,不能提交!',
-            showCancel: false
-        })
-    }
-}
-
-
-// 接单
-const takeOrderShow = ref(false);
-
-function takeOrders() {
-    $Http.basic({
-        id: 20230210101103,
-        "content": {
-            "sa_workorderid": detail.sa_workorderid
-        }
-    }).then(res => {
-        console.log("接单结果", res)
-        if (res.code == 1) {
-            takeOrderShow.value = false;
-            getDetail();
-            uni.showToast({
-                title: '接单成功',
-                icon: 'none'
-            });
-        } else {
-            if (res.msg) uni.showToast({
-                title: res.msg,
-                icon: 'none'
-            });
-        }
-    })
-}
-
-// 修改信息
-function toChangeMsg() {
-    uni.navigateTo({
-        url: `/pages/workOrder/changeMsg?id=` + sa_workorderid
-    });
-};
-
-// 确认开始
-const confirmStartShow = ref(false);
-
-function confirmStart() {
-    $Http.basic({
-        id: 20230209144503,
-        "content": {
-            "sa_workorderid": detail.sa_workorderid
-        }
-    }).then(res => {
-        console.log("确认开始", res)
-        if (res.code == 1) {
-            confirmStartShow.value = false;
-            getDetail();
-            uni.showToast({
-                title: '确认开始成功',
-                icon: 'none'
-            });
-        } else {
-            if (res.msg) uni.showToast({
-                title: res.msg,
-                icon: 'none'
-            });
-        }
-    })
-}
-
-defineExpose({ detail })
-
-</script>
-
-<style lang="scss" scoped>
-.main {
-    position: relative;
-    width: 690rpx;
-    background: #FFFFFF;
-    box-shadow: 0rpx 4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
-    border-radius: 10rpx;
-    box-sizing: border-box;
-    padding: 40rpx;
-    margin: 40rpx auto 0;
-    overflow: hidden;
-
-    .changeTransition {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        color: #3874F6;
-        font-size: 28rpx;
-        position: absolute;
-        bottom: 0;
-        left: 0;
-        width: 100%;
-        height: 60rpx;
-        background: #EDF4FF;
-
-        .icon-dianjizhankai {
-            font-size: 20rpx;
-            margin-left: 16rpx;
-            transform: rotate(-90deg);
-            transition: transform 0.3s ease;
-        }
-
-        .shrink {
-            transform: rotate(90deg);
-        }
-    }
-
-    .row {
-        display: flex;
-        font-size: 28rpx;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        line-height: 32rpx;
-        margin-top: 20rpx;
-
-        .label {
-            position: relative;
-            width: 108rpx;
-            color: #999999;
-            box-sizing: border-box;
-            flex-shrink: 0;
-            margin-right: 30rpx;
-        }
-
-        .label::after {
-            position: absolute;
-            top: 0;
-            right: -12rpx;
-            content: ':';
-        }
-
-        .value {
-            color: #333333;
-        }
-
-        .phonenumber {
-            width: 100%;
-            display: flex;
-            align-items: center;
-        }
-
-        .servicetype {
-            border-radius: 8rpx;
-            padding: 8rpx 16rpx;
-            font-weight: bold;
-            color: #fff;
-        }
-    }
-
-    .col-center {
-        display: flex;
-        align-items: center;
-    }
-
-    .col-center::after {
-        top: 50% !important;
-        transform: translateY(-50%);
-    }
-
-    .justify {
-        text-align: justify;
-        text-align-last: justify;
-    }
-
-    .billno {
-        position: relative;
-        width: 400rpx;
-        top: -40rpx;
-        left: -40rpx;
-        background: #3874F6;
-        border-radius: 0 0rpx 24rpx 0rpx;
-        padding: 10rpx 52rpx 10rpx 20rpx;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-size: 26rpx;
-        color: #FFFFFF;
-    }
-}
-
-.but-box {
-    display: flex;
-    align-items: center;
-    justify-content: space-around;
-    margin-top: 40rpx;
-
-    .but-box-item {
-        width: 45%;
-    }
-}
-</style>

+ 0 - 227
pages/workOrder/index.vue

@@ -1,227 +0,0 @@
-<template>
-    <view v-if="!['待接单', '已完成'].includes(content.where.status)" style="background-color: #fff;">
-        <up-tabs lineColor="#3874F6" :scrollable="false" :list="[{
-            name: '待开始'
-        }, {
-            name: '进行中'
-        }, {
-            name: '已提交',
-            value: '提交'
-        }]" @click="tabClick" />
-    </view>
-    <My_listbox ref="listBox" :empty="!list.length" @getlist="getList">
-        <view style="height: 18rpx;" />
-        <navigator class="item" v-for="item in list" :key="item.sa_workorderid"
-            :url="'/pages/workOrder/detail?id=' + item.sa_workorderid" hover-class="navigator-hover">
-            <view class="head">
-                <view class="tag"
-                    :style="{ 'background': { '安装': '#70B603', '维修': '#D9001B', '清洁': '#3874F6', '清洗': '#3874F6' }[item.type] || '#999999' }">
-                    {{ item.type }}
-                </view>
-                <view class="time">
-                    {{ item.createdate }}
-                </view>
-            </view>
-            <view class="address">
-                {{ item.address }}
-            </view>
-            <view class="user">
-                {{ item.customername + ' ' + item.customerphonenumber }}
-            </view>
-            <view v-if="content.where.status != '已完结'" class="but-box" @click.stop>
-                <view class="but-box-item">
-                    <My-button :customStyle="{
-                        'background-color': '#FFFFFF',
-                        'color': '#3874F6',
-                        height: '70rpx',
-                    }" frontIcon="icon-bodadianhua1" text="电话" :phonenumber="item.customerphonenumber" />
-                </view>
-                <view v-if="content.where.status == '待接单'" class="but-box-item" @click="openModel(item)">
-                    <My-button :customStyle="{
-                        height: '70rpx',
-                    }" frontIcon="icon-dianhua" text="接单" />
-                </view>
-                <navigator v-else :url="'/pages/workOrder/detail?id=' + item.sa_workorderid" class="but-box-item">
-                    <My-button :customStyle="{
-                        height: '70rpx',
-                    }" frontIcon="icon-dianhua" text="报工" />
-                </navigator>
-            </view>
-        </navigator>
-    </My_listbox>
-
-    <up-modal negativeTop="100" :show="takeOrderShow" title="是否确认接单?" showCancelButton @confirm="takeOrders"
-        @cancel="takeOrderShow = false" ref="uModal" :asyncClose="true"></up-modal>
-</template>
-
-<script setup>
-import { ref, reactive, getCurrentInstance } from 'vue';
-const { $Http } = getCurrentInstance().proxy;
-import { onLoad, onShow } from '@dcloudio/uni-app';
-
-const listBox = ref(null);
-const content = reactive({
-    loading: false,
-    isadmin: 0,
-    "pageNumber": 1,
-    "pageSize": 20,
-    "where": {
-        "status": '',
-        "condition": ""
-    }
-});
-const list = ref([])
-
-function tabClick(e) {
-    content.where.status = e.value || e.name;
-    getList(true);
-}
-
-onLoad((options) => {
-    switch (options.type) {
-        case '待接单':
-            uni.setNavigationBarTitle({
-                title: '待接工单'
-            });
-            content.where.status = options.type;
-            break;
-        case '进行中':
-            uni.setNavigationBarTitle({
-                title: '进行中工单'
-            });
-            content.where.status = '待开始';
-            break;
-        case '已完结':
-            uni.setNavigationBarTitle({
-                title: '已完结工单'
-            });
-            content.where.status = '已完成';
-            break;
-    }
-    getList();
-});
-
-onShow(() => {
-    if (content.pageNumber != 1) $Http.updateList(content, getList)
-})
-
-function getList(init = false) {
-    if (content.loading) return;
-    if (init) content.pageNumber = 1;
-    content.loading = true;
-    $Http.basic({
-        "id": "20230208140203",
-        content
-    }).then(res => {
-        console.log("获取列表", res)
-        content.loading = false;
-        listBox.value.refreshToComplete();
-        listBox.value.setHeight();
-        if (res.code == 1) {
-            list.value = reactive(res.firstPage ? res.data : list.value.concat(res.data));
-            content.pageTotal = res.pageTotal;
-            content.pageNumber = res.pageNumber;
-        } else {
-            if (res.msg) uni.showToast({
-                title: res.msg,
-                icon: 'none'
-            });
-        }
-    })
-}
-
-let takeOrderShow = ref(false);
-let takeItem = null;
-
-function openModel(item) {
-    takeItem = item;
-    takeOrderShow.value = true;
-}
-
-function takeOrders() {
-    $Http.basic({
-        id: 20230210101103,
-        "content": {
-            "sa_workorderid": takeItem.sa_workorderid
-        }
-    }).then(res => {
-        console.log("接单结果", res)
-        if (res.code == 1) {
-            takeOrderShow.value = false;
-            uni.navigateTo({
-                url: '/pages/workOrder/detail?id=' + takeItem.sa_workorderid,
-                success: (result) => {
-                    uni.showToast({
-                        title: '接单成功',
-                        icon: 'none'
-                    });
-                },
-            })
-            $Http.updateList(content, getList)
-        } else {
-            if (res.msg) uni.showToast({
-                title: res.msg,
-                icon: 'none'
-            });
-        }
-    })
-}
-
-</script>
-
-<style lang="scss" scoped>
-.item {
-    width: 690rpx;
-    background: #FFFFFF;
-    box-shadow: 0rpx 4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
-    margin: 0 auto 20rpx;
-    padding: 20rpx 40rpx;
-    box-sizing: border-box;
-
-    .head {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-
-        .tag {
-            font-family: PingFang SC, PingFang SC;
-            font-size: 24rpx;
-            color: #FFFFFF;
-            padding: 8rpx 20rpx;
-        }
-
-        .time {
-            font-family: Microsoft YaHei, Microsoft YaHei;
-            font-size: 24rpx;
-            color: #999999;
-        }
-    }
-
-    .address {
-        line-height: 38rpx;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-size: 28rpx;
-        color: #333333;
-        margin-top: 20rpx;
-    }
-
-    .user {
-        line-height: 32rpx;
-        font-family: Microsoft YaHei, Microsoft YaHei;
-        font-size: 24rpx;
-        color: #999999;
-        margin-top: 20rpx;
-    }
-
-    .but-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-around;
-        margin-top: 20rpx;
-
-        .but-box-item {
-            width: 40%;
-        }
-    }
-}
-</style>

+ 0 - 95
pages/workOrder/modules/nodes.vue

@@ -1,95 +0,0 @@
-<template>
-    <view class="node" :class="prefix ? 'child' : ''"
-        :hover-class="!prefix && item.child.length ? '' : 'navigator-hover'" v-for="item in nodes"
-        :key="item.sa_workorder_nodeid" @click.stop="toWork(item)">
-        <view class="number">
-            {{ (prefix ? prefix + '-' : '') + item.rowindex }}.
-        </view>
-        <view style="flex: 1;">
-            <view class="label">
-                {{ item.workpresetjson.workname }}
-            </view>
-            <node v-if="!prefix && item.child.length" :nodes="item.child"
-                :prefix="(prefix ? prefix + '-' : '') + item.rowindex" />
-            <view v-else class="stuta">
-                <view class="tag" style="background-color: #E64D55;" v-if="item.status == '0'">未完成</view>
-                <view class="tag" style="background-color: #06A971;" v-if="item.status == '1'">已完成</view>
-                <view class="tag" style="background-color: #70B603;" v-if="item.status == '2'">进行中</view>
-            </view>
-        </view>
-    </view>
-</template>
-
-<script setup>
-import { getCurrentInstance } from 'vue';
-const { $Http } = getCurrentInstance().proxy;
-import { defineProps } from 'vue';
-import node from "./nodes.vue";
-
-const props = defineProps({
-    nodes: {
-        type: Array
-    },
-    prefix: {
-        type: [String, Number],
-    }
-});
-function toWork(item) {
-    try {
-        if (item.child.length) return;
-    } catch (error) {
-        item.child = [];
-    }
-    if (item.child.length) return;
-    item.title = (props.prefix ? props.prefix + '-' : '') + item.rowindex + '. ' + item.workpresetjson.workname;
-    $Http.data = item;
-
-    uni.navigateTo({
-        url: '/pages/workOrder/work',
-    })
-}
-</script>
-
-<style lang="scss" scoped>
-.node {
-    display: flex;
-    padding: 10rpx;
-    margin-top: 10rpx;
-    font-family: Microsoft YaHei, Microsoft YaHei;
-    border-radius: 8rpx;
-
-    .label,
-    .number {
-        font-size: 32rpx;
-    }
-
-    .number {
-        margin-right: 10rpx;
-    }
-
-    .stuta {
-        margin-top: 20rpx;
-        display: flex;
-
-        .tag {
-            border-radius: 8rpx;
-            padding: 8rpx 12rpx;
-            font-size: 24rpx;
-            color: #fff;
-        }
-    }
-}
-
-
-.child {
-    margin-left: -55rpx;
-    width: calc(100% + 65rpx);
-    transform: scale(0.9);
-
-    .label,
-    .number {
-        color: #333;
-    }
-
-}
-</style>

+ 0 - 133
pages/workOrder/modules/products.vue

@@ -1,133 +0,0 @@
-<template>
-    <up-swipe-action>
-        <up-swipe-action-item v-for="item in list" :key="item.itemid" :options="options1" @click="onClick(item)">
-            <view class="item">
-                <view class="left" @click.stop="previewImge(item.imageUrl)">
-                    <up-image :show-loading="true" :src="item.imageUrl" width="100%" height="100%" />
-                </view>
-                <view class="right">
-                    <view class="itemname">
-                        {{ item.itemname || '--' }}
-                    </view>
-                    <view class="row">
-                        分类:{{ item.bomfullname || '--' }}
-                    </view>
-                    <view class="row">
-                        型号:{{ item.model || '--' }}
-                    </view>
-                    <view class="row">
-                        售价:<text class="price">{{ item.price }}</text>
-                    </view>
-                    <view class="number">
-                        <up-number-box v-model="item.qty" @change="valChange" />
-                    </view>
-                </view>
-            </view>
-        </up-swipe-action-item>
-    </up-swipe-action>
-</template>
-
-<script setup>
-import { defineProps, defineEmits, ref, reactive } from 'vue';
-const emits = defineEmits(['deleteItem']);
-const props = defineProps({
-    list: {
-        type: Array
-    },
-    deleteItem: {
-        type: Function
-    }
-});
-
-// 使用 reactive 创建响应式对象  
-const options1 = reactive([{
-    text: '删除',
-    style: {
-        backgroundColor: '#FA5151'
-    }
-}]);
-
-function onClick(item) {
-    uni.showModal({
-        title: '提示',
-        content: `是否确定删除“${item.itemname || '该产品'}”?`,
-        confirmText: '删除',
-        success: ({ confirm }) => {
-            if (confirm) {
-                emits('deleteItem', item);
-            }
-        },
-    })
-}
-
-function valChange(e) {
-    console.log(e)
-}
-
-function previewImge(url) {
-    if (!url) return;
-    uni.previewImage({
-        urls: [url],
-        current: url
-    });
-}
-</script>
-
-<style lang="scss" scoped>
-.item {
-    display: flex;
-    width: 100%;
-    background: #FFFFFF;
-    border-radius: 20rpx;
-    padding: 16rpx;
-    padding-left: 0;
-    box-sizing: border-box;
-    margin-top: 16rpx;
-
-    .left {
-        flex-shrink: 0;
-        width: 174rpx;
-        height: 174rpx;
-        background: #FFFFFF;
-        border-radius: 8rpx;
-        border: 2rpx solid #707070;
-        margin-right: 20rpx;
-        overflow: hidden;
-    }
-
-    .right {
-        position: relative;
-        right: 1;
-
-        .itemname {
-            line-height: 38rpx;
-            font-family: PingFang SC, PingFang SC;
-            font-weight: bold;
-            font-size: 28rpx;
-            color: #333333;
-        }
-
-        .row {
-            line-height: 40rpx;
-            font-family: PingFang SC, PingFang SC;
-            font-size: 24rpx;
-            color: #999999;
-
-            .price {
-                color: #FA5151;
-            }
-        }
-
-        .number {
-            position: absolute;
-            right: 0rpx;
-            bottom: 0rpx;
-        }
-
-    }
-}
-
-.item:first-child {
-    margin-top: 0;
-}
-</style>

+ 0 - 502
pages/workOrder/work.vue

@@ -1,502 +0,0 @@
-<template>
-    <view class="content">
-        <up-form :model="form" labelWidth="70" ref="uFormRef" disabled>
-            <block v-if="workpresetjson.questionedit != 0 && workpresetjson.questionoption">
-                <up-form-item label="故障类型" prop="itemtype" :required="workpresetjson.questionedit == 11">
-                    <view class="options-box">
-                        <view class="option" :class="form.itemtype == item.value ? 'active' : ''"
-                            v-for="item in questionoption" :key="item.value"
-                            @click="clickRadio(item.value, 'itemtype')">
-                            {{ item.value }}
-                        </view>
-                    </view>
-                </up-form-item>
-                <up-form-item label="问题编辑" prop="questionedit" :required="workpresetjson.questionedit == 11">
-                    <up-textarea :disabled="data.status == 1" v-model="form.questionedit" placeholder="问题编辑" autoHeight
-                        height="20" />
-                </up-form-item>
-            </block>
-
-
-            <up-form-item v-if="workpresetjson.passcheck != 0" label="合格确认" prop="passcheck"
-                :required="workpresetjson.passcheck == 11">
-                <view class="options-box">
-                    <view class="option" :class="form.passcheck == item.value ? 'active' : ''" v-for="item in [
-                        { value: '1', name: '正常' },
-                        { value: '0', name: '异常' }]" :key="item.value" @click="clickRadio(item.value, 'passcheck')">
-                        {{ item.name }}
-                    </view>
-                </view>
-            </up-form-item>
-
-            <view v-if="workpresetjson.additem != 0">
-                <up-form-item label="是否更换配件" prop="oldtitems" :required="workpresetjson.additem == 11">
-                    <view class="options-box">
-                        <view class="option" :class="form.additem == item.value ? 'active' : ''" v-for="item in [
-                            { value: '1', name: '是' },
-                            { value: '0', name: '否' }]" :key="item.value" @click="clickRadio(item.value, 'additem')">
-                            {{ item.name }}
-                        </view>
-                    </view>
-                </up-form-item>
-
-                <block v-if="form.additem == 1">
-                    <up-form-item label="配件清单" prop="items" required>
-                        <view class="options-box">
-                            <view class="option active" hover-class="navigator-hover" @click="toAddItem">
-                                + 去添加配件
-                            </view>
-                        </view>
-                    </up-form-item>
-                    <accList :list="data.oldtitems" @deleteItem="deleteItem" />
-                </block>
-            </view>
-
-            <up-form-item v-if="workpresetjson.confirm != 0" label="确认信息" prop="confirm"
-                :required="workpresetjson.confirm == 11">
-                <view class="options-box">
-                    <view class="option" :class="form.confirm == item ? 'active' : ''"
-                        v-for="(item) in workpresetjson.confirm_options" :key="item"
-                        @click="clickRadio(item, 'confirm')">
-                        {{ item }}
-                    </view>
-                </view>
-            </up-form-item>
-
-            <up-form-item v-if="workpresetjson.amountpay != 0" label="费用支付" prop="amountpay"
-                :required="workpresetjson.amountpay == 11">
-                <up-input :disabled="data.status == 1" v-model="form.amountpay" type="number" placeholder="费用支付">
-                    <template #suffix>
-                        元
-                    </template>
-                </up-input>
-            </up-form-item>
-
-            <up-form-item v-if="workpresetjson.fileupload != 0" label="拍照" prop="fileupload"
-                :required="rules.fileupload[0].required">
-                <My_upload :disabled="data.status == 1" ref="upload" :fileList="data.attinfos"
-                    @uploadCallback="uploadCallback" />
-            </up-form-item>
-
-            <up-form-item v-if="workpresetjson.textedit != 0" label="文字说明" prop="textedit"
-                :required="rules.textedit[0].required">
-                <up-textarea :disabled="data.status == 1" v-model="form.textedit" placeholder="文字说明" autoHeight
-                    height="20" />
-            </up-form-item>
-        </up-form>
-
-        <view class="but-box" v-if="data.status != '1'">
-            <view class="but-box-item" @click="save">
-                <My-button :customStyle="{
-                    'background-color': '#FFFFFF',
-                    'color': '#3874F6',
-                    height: '80rpx',
-                }" text="保存" :disabled="loading" :loading="loading1" />
-            </view>
-            <view class="but-box-item" @click="submit">
-                <My-button :customStyle="{
-                    height: '80rpx',
-                }" text="完成" :disabled="loading1" :loading="loading" />
-            </view>
-        </view>
-        <view style="height: 50px;" />
-
-
-        <page-container :show="true" :overlay="false" @beforeleave="beforeleave" />
-    </view>
-</template>
-
-<script setup>
-import { ref, reactive, getCurrentInstance, watch } from 'vue';
-import { onLoad } from '@dcloudio/uni-app';
-import accList from "./modules/products.vue";
-
-const { $Http } = getCurrentInstance().proxy;
-const uFormRef = ref(null);
-const upload = ref(null);
-
-let formModified = ref(false);
-
-function beforeleave(e) {
-    if (formModified.value && data.status != '1') {
-        uni.showModal({
-            title: '提示',
-            content: '是否保存当前编辑内容?',
-            confirmText: '保存',
-            cancelText: '不保存',
-            success: function (res) {
-                if (res.confirm) {
-                    save()
-                    setTimeout(() => {
-                        uni.navigateBack()
-                    }, 500);
-                } else if (res.cancel) {
-                    uni.navigateBack()
-                }
-            }
-        });
-    } else {
-        uni.navigateBack()
-    }
-}
-
-// 去添加配件
-function toAddItem() {
-    if (data.status == '1') return;
-    uni.navigateTo({
-        url: '/pages/select/accessories?list=' + JSON.stringify(data.oldtitems || []),
-    });
-
-    $Http.selectAcc = (res) => {
-        data.oldtitems = res;
-        form.oldtitems = data.oldtitems.length ? '1' : '';
-        uni.navigateBack();
-        delete $Http.selectAcc
-    }
-}
-
-// 删除配件
-function deleteItem(item) {
-    data.oldtitems = data.oldtitems.filter(v => v.itemid !== item.itemid);
-    form.oldtitems = data.oldtitems.length ? '1' : '';
-}
-
-const form = reactive({
-    textedit: '', // 上传文本
-    confirm: "", // 确认信息
-    itemtype: "", // 故障类型
-    questionedit: "", // 问题编辑
-    additem: "", // 是否更换配件
-    passcheck: "", //合格确认 异常时 文字和图片必填
-    amountpay: "", // 费用支付
-    fileupload: "", // 上传图片
-    oldtitems: "",//配件
-});
-
-let keys = {
-    textedit: 'textcontent', // 文本内容
-    amountpay: 'amount', // 费用支付
-    confirm: 'confirm_value', // 确认信息
-    itemtype: "questionoption",
-    questionedit: "questionedit",
-    passcheck: "passcheck",
-}
-// keys 与 form 互相转换字段
-let formToContent = (form) => {
-    let content = {};
-    for (let key in keys) {
-        if (form[key]) {
-            content[keys[key]] = form[key];
-        }
-    }
-    return content;
-}
-
-let data = {
-    attinfos: []
-};
-let workpresetjson = reactive({});
-
-let rules = reactive({
-    textedit: [
-        { required: false, message: '请输入说明', trigger: 'blur' }
-    ],
-    fileupload: [
-        { required: false, message: '请上传图片', trigger: 'change' }
-    ],
-});
-const questionoption = ref([]);
-
-onLoad(() => {
-    data = reactive($Http.data);
-    delete $Http.data;
-
-    for (let key in keys) {
-        if (data[keys[key]]) {
-            form[key] = data[keys[key]];
-        }
-    }
-
-    form.fileupload = data.attinfos.length ? '1' : '';
-    uni.setNavigationBarTitle({
-        title: data.title,
-    })
-    workpresetjson = Object.assign(workpresetjson, data.workpresetjson);
-
-    if (workpresetjson.additem) {
-        data.oldtitems = data.detail[0].oldtitems.map(item => {
-            item.imageUrl = item.attinfos.length ? $Http.getSpecifiedImage(item.attinfos[0]) : ''
-            return item;
-        });;
-        form.oldtitems = data.oldtitems.length ? '1' : '';
-        form.additem = form.oldtitems.length ? '1' : '0';
-    }
-
-    rules = Object.assign(rules, {
-        textedit: [
-            { required: workpresetjson.textedit == 11, message: '请输入说明', trigger: 'blur' },
-            { min: 2, max: 500, message: '长度在 2 到 500 个字符', trigger: 'blur' }
-        ],
-        confirm: [
-            { required: workpresetjson.confirm == 11, message: '请选择确认信息', trigger: 'change' }
-        ],
-        itemtype: [
-            { required: workpresetjson.questionedit == 11, message: '请选择故障类型', trigger: 'change' }
-        ],
-        questionedit: [
-            { required: workpresetjson.questionedit == 11, message: '请输入问题编辑', trigger: 'blur' },
-            { min: 2, max: 500, message: '长度在 2 到 500 个字符', trigger: 'blur' }
-        ],
-        additem: [
-            { required: workpresetjson.additem == 11, message: '请选择是否更换配件', trigger: 'change' }
-        ],
-        passcheck: [
-            { required: workpresetjson.passcheck == 11, message: '请选择合格确认', trigger: 'change' }
-        ],
-        amountpay: [
-            { required: workpresetjson.amountpay == 11, message: '请输入费用支付', trigger: 'blur' },
-            { pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的金额', trigger: 'blur' }
-        ],
-        fileupload: [
-            { required: workpresetjson.fileupload == 11, message: '请上传图片', trigger: 'change' }
-        ],
-    })
-
-    setTimeout(() => {
-        if (data.passcheck == '0') {
-            rules.textedit[0].required = true;
-            rules.fileupload[0].required = true;
-        }
-        uFormRef.value.setRules(rules);
-    });
-
-    if (workpresetjson.questionoption) $Http.getClass(workpresetjson.questionoption).then(res => {
-        questionoption.value = res.data;
-        if (res.code !== 1) return uni.showToast({ title: res.msg, icon: 'none' });
-    })
-
-    // 添加表单修改监听
-    const originalForm = JSON.parse(JSON.stringify(form));
-    watch(form, (newVal) => {
-        if (JSON.stringify(newVal) !== JSON.stringify(originalForm)) {
-            formModified.value = true;
-        }
-    }, { deep: true });
-
-});
-
-
-// 保存
-const loading = ref(false);
-const loading1 = ref(false);
-
-function submit() {
-    if (loading.value) return;
-    if (upload.value.isUploading()) return;
-
-    let traintitem = []
-    try {
-        if (from.additem) {
-            traintitem = data.oldtitems.map(v => {
-                return {
-                    itemid: v.itemid,
-                    itemname: v.itemname,
-                    model: v.model,
-                    price: v.price,
-                    qty: v.qty || v.packageqty || 1,
-                }
-            })
-        }
-    } catch (error) {
-
-    }
-
-    uFormRef.value.validate().then(valid => {
-        if (valid) {
-            let content = {
-                "sa_workorderid": data.sa_workorderid,
-                "sa_workorder_nodeid": data.sa_workorder_nodeid,
-                isconfirm: 1,
-                ...formToContent(form),
-                traintitem
-            };
-            uni.showModal({
-                title: '提示',
-                content: '是否确定完成工序?完成后将无法再次编辑。',
-                confirmText: '完成',
-                success: function (res) {
-                    if (res.confirm) {
-                        loading.value = true;
-                        $Http.basic({
-                            "id": "20230209094203",
-                            "sa_workorderid": data.sa_workorderid,
-                            "sa_workorder_nodeid": data.sa_workorder_nodeid,
-                            content
-                        }).then(res => {
-                            loading.value = false;
-                            console.log("提交工单", res);
-                            if (res.code == 1) {
-                                loading.value = true;
-                                upload.value.saveFileLinks('sa_workorder_node', data.sa_workorder_nodeid).then((s) => {
-                                    loading.value = false;
-                                    formModified.value = false;
-                                    setTimeout(() => {
-                                        uni.navigateBack()
-                                    }, 800);
-                                })
-                            }
-                            uni.showToast({ title: res.code !== 1 ? res.msg : "提交成功", icon: 'none', mask: res.code == 1 });
-                        }).catch(err => {
-                            loading.value = false;
-                            console.error("提交工单失败", err);
-                            uni.showToast({ title: '提交失败,请稍后重试', icon: 'none' });
-                        });
-                    }
-                }
-            });
-        }
-    })
-}
-
-function save() {
-    if (loading1.value) return;
-    if (upload.value.isUploading()) return;
-    let traintitem = []
-    try {
-        if (from.additem) {
-            traintitem = data.oldtitems.map(v => {
-                return {
-                    itemid: v.itemid,
-                    itemname: v.itemname,
-                    model: v.model,
-                    price: v.price,
-                    qty: v.qty || v.packageqty || 1,
-                }
-            })
-        }
-    } catch (error) {
-
-    }
-    let content = {
-        "sa_workorderid": data.sa_workorderid,
-        "sa_workorder_nodeid": data.sa_workorder_nodeid,
-        isconfirm: 0,
-        ...formToContent(form),
-        traintitem
-    };
-    loading1.value = true;
-    $Http.basic({
-        "id": "20230209094203",
-        "sa_workorderid": data.sa_workorderid,
-        "sa_workorder_nodeid": data.sa_workorder_nodeid,
-        content
-    }).then(res => {
-        loading1.value = false;
-        console.log("保存工单", res);
-        if (res.code == 1) {
-            loading1.value = true;
-            upload.value.saveFileLinks('sa_workorder_node', data.sa_workorder_nodeid).then((s) => {
-                loading1.value = false;
-            })
-            formModified.value = false;
-        }
-        uni.showToast({ title: res.code !== 1 ? res.msg : "保存成功", icon: 'none' });
-    })
-}
-
-function clickRadio(value, key) {
-    if (data.status == '1') return;
-    form[key] = form[key] == value ? "" : value;
-    if (key == 'passcheck') {
-        if (value == '0') {
-            rules.textedit[0].required = true;
-            rules.fileupload[0].required = true;
-        } else {
-            rules.textedit[0].required = workpresetjson.textedit == 11;
-            rules.fileupload[0].required = workpresetjson.fileupload == 11;
-        }
-        uFormRef.value.setRules(rules);
-    } else if (key == 'additem') {
-        if (value == '1') {
-            rules.oldtitems = [{ required: true, message: '请选择配件清单', trigger: 'change' }];
-        } else {
-            delete rules.oldtitems;
-        }
-        if (value == '1' && !data.oldtitems.length) toAddItem();
-        form.oldtitems = data.oldtitems.length ? '1' : '';
-        uFormRef.value.setRules(rules);
-    }
-}
-
-function uploadCallback(list) {
-    console.log("上传回调", list);
-    form.fileupload = list.fileList.length ? '1' : '';
-    console.log("form", form)
-}
-
-
-</script>
-
-<style lang="scss" scoped>
-.content {
-    width: 100vw;
-    padding: 20px;
-    box-sizing: border-box;
-    min-height: 100vh;
-    background: #fff;
-
-
-    .picker {
-        width: 100%;
-        // border-bottom: 1px solid #dadbde;
-        font-size: 32rpx;
-        color: #606266;
-        padding: 9px;
-        border-radius: 8rpx;
-    }
-
-    .title {
-        font-size: 34rpx;
-        color: #4773EE;
-        margin: 20rpx 0;
-        font-weight: bold;
-    }
-
-    .options-box {
-        position: relative;
-        top: -6rpx;
-        display: flex;
-        flex-wrap: wrap;
-        width: 100%;
-        box-sizing: border-box;
-
-        .option {
-            border: 1px solid #dadbde;
-            border-radius: 8rpx;
-            padding: 10rpx 20rpx;
-            margin-right: 18rpx;
-            margin-top: 12rpx;
-            transition: background-color 0.3s, color 0.3s, border-color 0.3s;
-            text-align: center;
-            min-width: 80rpx;
-        }
-
-        .active {
-            background: #006EF7;
-            color: #fff;
-            border-color: #006EF7;
-        }
-    }
-
-    .but-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-around;
-        margin-top: 40rpx;
-
-        .but-box-item {
-            width: 45%;
-        }
-    }
-}
-</style>