970319330@qq.com 3 天之前
父節點
當前提交
b1259cc633

二進制
.DS_Store


+ 182 - 3
src/bgj/pointsbasedorder/index.vue

@@ -1,13 +1,192 @@
 <template>
     <div>
-        积分订单
+        <basicLayout
+            ref="basicLayout"
+            :oldFormPath="{
+                add:'bgj/pointsbasedorder/modules'
+            }"
+            tableName="listTable"
+            idName="sc_orderid"
+            ownertable="sc_order"
+            :apiId="{query: 2026052510105006}"
+            :options="options"
+            @onFixedClick="rows"
+            :specialKey="[]"
+            @checkboxCallBack="rows"
+            :autoQuery="false"
+            :detailPath="{
+                path:'/pointsbasedorderDetail'
+            }"
+            :isExport="false"
+        >
+            <template #titleRight>
+                <el-button type="primary" size="small" @click="exportData" plain>{{$t(`导 出`)}}</el-button>
+            </template>
+            <template #custom>
+                <div class="mt-10">
+                    <label  class="search__label">{{$t(`状态`)}}:</label>
+                    <el-select class="inline-24" v-model="selectParam.status" :placeholder="$t(`请选择状态`)" @change="selectChange" size="small" clearable>
+                    </el-select>
+                </div>
+                <div class="mt-10">
+                    <label class="search__label">{{$t(`下单时间`)}}:</label>
+                    <el-date-picker
+                        style="margin-right: 24px !important;"
+                        size="small"
+                        @change="selectChange"
+                        value-format="yyyy-MM-dd"
+                        v-model="dateSelect"
+                        type="daterange"
+                        :range-separator="$t(`至`)"
+                        :start-placeholder="$t(`开始日期`)"
+                        :end-placeholder="$t(`结束日期`)"
+                        clearable>
+                    </el-date-picker>
+                </div>
+                <div class="mt-10">
+                    <label class="search__label">{{$t(`审核时间`)}}:</label>
+                    <el-date-picker
+                        style="margin-right: 24px !important;"
+                        size="small"
+                        @change="selectChange"
+                        value-format="yyyy-MM-dd"
+                        v-model="auditDateSelect"
+                        type="daterange"
+                        :range-separator="$t(`至`)"
+                        :start-placeholder="$t(`开始日期`)"
+                        :end-placeholder="$t(`结束日期`)"
+                        clearable>
+                    </el-date-picker>
+                </div>
+            </template>
+            <template v-slot:tbList="scope">
+                <div>
+                    <p v-if="scope.data.column.columnname === 'status'">
+                        <span :style="tool.getStatusColor(scope.data.column.data[[scope.data.column.columnname]])">{{$t(scope.data.column.data[[scope.data.column.columnname]])}}</span>
+                    </p>
+                    <div v-else>{{ scope.data.column.data[scope.data.column.columnname]?scope.data.column.data[scope.data.column.columnname] : ''}}</div>
+                </div>
+            </template>
+        </basicLayout>
     </div>
 </template>
 
 <script>
 export default {
-
+    data() {
+        return {
+            options: [],
+            selectParam: {
+                status: '',
+                begindate: '',
+                enddate: '',
+                auditbegindate: '',
+                auditenddate: '',
+                condition: ''
+            },
+            rowData: [],
+            dateSelect: '',
+            auditDateSelect: '',
+            tablecols: []
+        }
+    },
+    components: {},
+    methods: {
+        selectChange() {
+            if (this.dateSelect !== '' && this.dateSelect !== null) {
+                this.selectParam.begindate = this.dateSelect[0]
+                this.selectParam.enddate = this.dateSelect[1]
+            } else {
+                this.selectParam.begindate = ''
+                this.selectParam.enddate = ''
+            }
+            if (this.auditDateSelect !== '' && this.auditDateSelect !== null) {
+                this.selectParam.auditbegindate = this.auditDateSelect[0]
+                this.selectParam.auditenddate = this.auditDateSelect[1]
+            } else {
+                this.selectParam.auditbegindate = ''
+                this.selectParam.auditenddate = ''
+            }
+            this.$refs.basicLayout.param.content.pageNumber = 1
+            this.$refs.basicLayout.param.content.where = {
+                condition: this.selectParam.condition,
+                status: this.selectParam.status,
+                showShipping: false,
+                begindate: this.selectParam.begindate,
+                enddate: this.selectParam.enddate,
+                auditbegindate: this.selectParam.auditbegindate,
+                auditenddate: this.selectParam.auditenddate
+            }
+            this.$refs.basicLayout.listData()
+        },
+        async exportData() {
+            let rs = [];
+            if (this.tablecols) {
+                this.tablecols.filter((p) => {
+                    rs.push({
+                        fieldlabel: p.title,
+                        fieldname: p.columnname,
+                    });
+                });
+            }
+            const exportParam = {
+                id: 2026052510105606,
+                content: {
+                    where: {
+                        condition: this.selectParam.condition,
+                        status: this.selectParam.status,
+                        showShipping: false,
+                        begindate: this.selectParam.begindate,
+                        enddate: this.selectParam.enddate,
+                        auditbegindate: this.selectParam.auditbegindate,
+                        auditenddate: this.selectParam.auditenddate
+                    },
+                    exportFields: rs,
+                    isExport: 1
+                }
+            }
+            const res = await this.$api.requested(exportParam);
+            this.downFile(res.data[0].url, "积分订单");
+        },
+        downFile(url, fileName) {
+            const x = new XMLHttpRequest();
+            x.open("GET", url, true);
+            x.responseType = "blob";
+            x.onload = function () {
+                const url = window.URL.createObjectURL(x.response);
+                const a = document.createElement("a");
+                a.href = url;
+                a.download = fileName;
+                a.click();
+            };
+            x.send();
+        },
+        rows(val) {
+            console.log("点击")
+            console.log(val)
+            this.rowData = val
+        },
+        listData() {
+            this.$refs.basicLayout.param.content.where = {
+                condition: this.selectParam.condition,
+                status: this.selectParam.status,
+                showShipping: false,
+                begindate: this.selectParam.begindate,
+                enddate: this.selectParam.enddate,
+                auditbegindate: this.selectParam.auditbegindate,
+                auditenddate: this.selectParam.auditenddate
+            }
+            this.$refs.basicLayout.listData()
+        }
+    },
+    mounted() {
+        this.listData()
+    },
+    created() {
+        this.tablecols = this.tool.tabelCol(this.$route.name).listTable.tablecols
+    }
 }
 </script>
 
-<style></style>
+<style></style>
+<style scoped></style>

+ 402 - 3
src/bgj/pointsbasedorder/modules/detail.vue

@@ -1,13 +1,412 @@
 <template>
-  <div>积分订单详情</div>
+    <div>
+        <basicDetails
+            ref="details"
+            :titleText="mainData.sonum"
+            :editData="mainData"
+            :mainAreaData="mainAreaData"
+            turnPageId="2026052510105106"
+            idName="sc_orderid"
+            ownertable="sc_order"
+            tags=""
+            :tabs="['商品明细','基本信息']"
+            :column="5"
+            @pageChange="pageChange"
+            @onEditSuccess="queryMainData($route.query.id)"
+        >
+            <div slot="tags"></div>
+            <template slot="customOperation">
+                <el-button v-if="tool.checkAuth($route.name, 'check')"  :disabled="mainData.status !== '提交'" type="primary" size="mini" @click="onCheck">{{$t(`审 核`)}}</el-button>
+                <el-button v-if="tool.checkAuth($route.name, 'deliver')"  type="primary" size="mini" @click="dialogVisible = true">{{$t(`发 货`)}}</el-button>
+                <el-button v-if="tool.checkAuth($route.name, 'close')" :disabled="mainData.status !== '审核'" style="margin-right:10px" type="primary" size="mini" @click="onClose">{{$t(`关 闭`)}}</el-button>
+            </template>
+            <template #headerBottom>
+          <div style="display:flex">
+            <div class="address_info">
+              <div class="reveive__panel inline-16">
+                <div>
+                    <p class="normal-title" style="margin-bottom:10px;display:inline-block">{{$t(`收货信息`)}}<el-button type="text" size="small" style="margin-left:10px" @click="openAddressDialog">{{$t(`修改地址`)}}</el-button></p>
+                </div>
+                <div>
+                  <p class="inline-16"><b>{{mainData.name}}</b></p>
+                  <p class="inline-16"><span class="inline-16"><b>{{mainData.phonenumber}}</b></span></p>
+                </div>
+                <small>{{mainData.address?mainData.address:'--'}}</small>
+              </div>
+            </div>
+          </div>
+        </template>
+            <div slot="slot1">
+                <div class="normal-margin">
+                    <el-descriptions
+                        :column="2"
+                        :title="$t('收货信息')"
+                        labelClassName="my-label"
+                        contentClassName="my-content"
+                        border
+                    >
+                        <el-descriptions-item
+                            v-for="(item, index) in detailInfo.baseInfo"
+                            :key="index"
+                            :label="$t(item.label)"
+                        >
+                            <span :style="item.style ? item.style() : ''">{{
+                                item.value ? $t(item.value) : '--'
+                            }}</span>
+                        </el-descriptions-item>
+                    </el-descriptions>
+                </div>
+                <div class="normal-margin">
+                    <el-descriptions
+                        :column="3"
+                        :title="$t('系统信息')"
+                        labelClassName="my-label"
+                        contentClassName="my-content"
+                        border
+                    >
+                        <el-descriptions-item
+                            v-for="(item, index) in detailInfo.systemInfo"
+                            :key="index"
+                            :label="$t(item.label)"
+                        >
+                            {{ item.value ? $t(item.value) : '--' }}
+                        </el-descriptions-item>
+                    </el-descriptions>
+                </div>
+            </div>
+            <div slot="slot0">
+                <el-table :data="mainData.items" border size="small">
+                    <el-table-column v-for="(col,index) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" ></el-table-column>
+                </el-table>
+            </div>
+        </basicDetails>
+        <el-dialog append-to-body :title="$t(`填写物流单号`)" :visible.sync="dialogVisible" width="400px">
+            <el-form label-width="80px">
+                <el-form-item :label="$t(`物流单号`)">
+                    <el-input v-model="logisticno" :placeholder="$t(`请输入物流单号`)" size="small"></el-input>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false" size="small">{{$t('取 消')}}</el-button>
+                <el-button type="primary" @click="onDeliver" size="small">{{$t('确 定')}}</el-button>
+            </span>
+        </el-dialog>
+        <el-dialog append-to-body :title="$t(`选择收货地址`)" :visible.sync="addressDialogVisible" width="900px">
+            <el-table :data="addressList" border size="small">
+                <el-table-column prop="name" :label="$t(`收货人`)"></el-table-column>
+                <el-table-column prop="phonenumber" :label="$t(`手机号`)"></el-table-column>
+                <el-table-column prop="address" :label="$t(`收货地址`)"></el-table-column>
+                <el-table-column :label="$t(`操作`)" width="120">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small" @click.stop="openEditAddressDialog(scope.row)">{{$t(`修改`)}}</el-button>
+                        <el-button type="text" size="small" @click.stop="confirmAddress(scope.row)">{{$t(`选择`)}}</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </el-dialog>
+        <el-dialog append-to-body :title="$t(`修改收货地址`)" :visible.sync="editAddressDialogVisible" width="600px">
+            <el-form :model="editAddressForm" label-width="100px">
+                <el-form-item :label="$t(`收货人`)">
+                    <el-input v-model="editAddressForm.name" size="small"></el-input>
+                </el-form-item>
+                <el-form-item :label="$t(`手机号`)">
+                    <el-input v-model="editAddressForm.phonenumber" size="small"></el-input>
+                </el-form-item>
+                <el-form-item :label="$t(`省市县`)">
+                    <el-cascader
+                        :placeholder="$t('请选择')"
+                        style="width: 100%"
+                        v-model="editAddressForm.province"
+                        :options="basicData.data().areaData"
+                        @change="cascaderChange"
+                        clearable
+                    ></el-cascader>
+                </el-form-item>
+                <el-form-item :label="$t(`详细地址`)">
+                    <el-input v-model="editAddressForm.address" type="textarea" size="small"></el-input>
+                </el-form-item>
+                <el-form-item :label="$t(`是否默认`)">
+                    <el-radio-group v-model="editAddressForm.isdefault">
+                        <el-radio :label="1">{{$t(`是`)}}</el-radio>
+                        <el-radio :label="0">{{$t(`否`)}}</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="editAddressDialogVisible = false" size="small">{{$t('取 消')}}</el-button>
+                <el-button type="primary" @click="onEditAddress" size="small">{{$t('确 定')}}</el-button>
+            </span>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
 export default {
+    name: "detail",
+    data() {
+        return {
+            mainData: {},
+            mainAreaData: {},
+            detailInfo: "",
+            logisticno: "",
+            dialogVisible: false,
+            layout:[],
+            addressDialogVisible: false,
+            addressList: [],
+            editAddressDialogVisible: false,
+            editAddressForm: {
+                contactsid: '',
+                name: '',
+                phonenumber: '',
+                province: [],
+                city: '',
+                county: '',
+                address: '',
+                isdefault: 0
+            }
+        };
+    },
+    components: {},
+    methods: {
+        async queryMainData() {
+            const res = await this.$api.requested({
+                id: 2026052510105106,
+                content: {
+                    nocache: true,
+                    sc_orderid: this.$route.query.id,
+                },
+            });
+            this.mainData = res.data;
+            this.changeDataStructure();
+            console.log("this.mainData", this.mainData);
+        },
+        changeDataStructure() {
+            this.mainAreaData = [
+                {
+                    label: "订单号",
+                    value: this.mainData.sonum,
+                },
+                {
+                    label: "订单状态",
+                    value: this.mainData.status,
+                    style: () => {
+                        let color = this.tool.getStatusColor(this.mainData.status, true);
+                        return { color: color };
+                    },
+                },
+                {
+                    label: "订单类型",
+                    value: this.mainData.type,
+                },
+                {
+                    label: "创建时间",
+                    value: this.mainData.createdate,
+                },
+                {
+                    label: "购买者",
+                    value: this.mainData.submitby,
+                },
+                {
+                    label: "总积分",
+                    value: this.mainData.totalpoints,
+                },
+                {
+                    label: "总数量",
+                    value: this.mainData.totalqty,
+                },
+                {
+                    label: "审核时间",
+                    value: this.mainData.checkdate,
+                },
+                {
+                    label: "物流单号",
+                    value: this.mainData.logisticno,
+                },
+                {
+                    label: "备注",
+                    value: this.mainData.remark,
+                },
+            ];
+            this.detailInfo = {
+                baseInfo: [
+                    {
+                        label: "客户姓名",
+                        value: this.mainData.name,
+                    },
+                    {
+                        label: "客户电话",
+                        value: this.mainData.phone,
+                    },
+                    {
+                        label: "收货地址",
+                        value: this.mainData.address,
+                    },
+                ],
+                systemInfo: [
+                    { label: "创建人", value: this.mainData.createby },
+                    { label: "创建时间", value: this.mainData.createdate },
+                    { label: "提交人", value: this.mainData.submitby },
+                    { label: "提交时间", value: this.mainData.submitdate },
+                    { label: "审核人", value: this.mainData.checkby },
+                    { label: "审核时间", value: this.mainData.checkdate },
+                ],
+            };
+        },
+        pageChange(id, rowindex, tabIndex) {
+            this.flag = false;
+            tabIndex = this.$route.query.tabIndex;
+            this.$router.replace({
+                path: "/pointsbasedorderDetail",
+                query: { id: id, rowindex: rowindex, tabIndex: tabIndex },
+            });
+            this.queryMainData(id);
+        },
+        async onCheck() {
+            const res = await this.$api.requested({
+                id: 2026052510105406,
+                content: {
+                    sc_orderid: this.$route.query.id,
+                },
+            });
+            this.tool.showMessage(res, () => {
+                this.queryMainData();
+            });
+        },
+        async onClose() {
+            const res = await this.$api.requested({
+                id: 2026052510105506,
+                content: {
+                    sc_orderid: this.$route.query.id,
+                },
+            });
+            this.tool.showMessage(res, () => {
+                this.queryMainData();
+            });
+        },
+        async onDeliver() {
+            if (!this.logisticno) {
+                this.$message.error(this.$t("请输入物流单号"));
+                return;
+            }
+            const res = await this.$api.requested({
+                id: 2026052510105306,
+                content: {
+                    sc_orderid: this.$route.query.id,
+                    logisticno: this.logisticno,
+                },
+            });
+            this.tool.showMessage(res, () => {
+                this.dialogVisible = false;
+                this.logisticno = "";
+                this.queryMainData();
+            });
+        },
+        async openAddressDialog() {
+            this.addressDialogVisible = true;
+            await this.queryAddressList();
+        },
+        async queryAddressList() {
+            const res = await this.$api.requested({
+                id: "20221022165503",
+                content: {
+                    pageNumber: 1,
+                    pageSize: 99999,
+                    where: {
+                        createuserid: this.mainData.userid
+                    }
+                },
+            });
+            this.addressList = res.data || [];
+        },
+        selectAddress(row) {
+            this.confirmAddress(row);
+        },
+        openEditAddressDialog(row) {
+            const province = row.province || '';
+            const city = row.city || '';
+            const county = row.county || '';
+            this.editAddressForm = {
+                contactsid: row.contactsid,
+                name: row.name,
+                phonenumber: row.phonenumber,
+                province: province ? [province, city, county] : [],
+                city: city,
+                county: county,
+                address: row.address,
+                isdefault: row.isdefault
+            };
+            this.editAddressDialogVisible = true;
+        },
+        cascaderChange(val) {
+            this.editAddressForm.province = val;
+        },
+        async onEditAddress() {
+            const province = this.editAddressForm.province[0] || '';
+            const city = this.editAddressForm.province[1] || '';
+            const county = this.editAddressForm.province[2] || '';
+            const res = await this.$api.requested({
+                id: 20221018141802,
+                content: {
+                    contactsid: this.editAddressForm.contactsid,
+                    address: this.editAddressForm.address,
+                    name: this.editAddressForm.name,
+                    phonenumber: this.editAddressForm.phonenumber,
+                    province: province,
+                    city: city,
+                    county: county,
+                    isdefault: this.editAddressForm.isdefault
+                },
+            });
+            this.tool.showMessage(res, () => {
+                this.editAddressDialogVisible = false;
+                this.queryAddressList();
+            });
+        },
+        async confirmAddress(row) {
+            this.mainData.name = row.name;
+            this.mainData.phonenumber = row.phonenumber;
+            this.mainData.address = row.address;
+            this.addressDialogVisible = false;
+            const res = await this.$api.requested({
+                id: 2026052510105206,
+                content: {
+                    sc_orderid: this.$route.query.id,
+                    rec_contactsid: row.contactsid,
+                },
+            });
+            this.tool.showMessage(res, () => {
+                this.queryMainData();
+            });
+        }
+    },
+    mounted() {
+        this.queryMainData(this.$route.query.id);
+        this.layout = this.tool.tabelCol(this.$route.name)['mxTable'].tablecols;
+        this.basicData.arealist();
+    },
+    created() {},
+};
+</script>
 
+<style scoped>
+.reveive__panel{
+  font-size: 16px;
+  line-height: 30px;
+  padding: 0 10px;
+  margin-top:10px;
+  background: #d9ecff;
+  border: 1px dashed #0676e7;
 }
-</script>
 
-<style>
+.reveive__panel{
+    min-width:400px;
+}
 
+.address_info small{
+  color:#888
+}
+.normal-title{
+    display: flex !important;
+    justify-content: space-between;
+}
 </style>

+ 2 - 2
src/bgj/pointsbasedproducts/modules/batchDown.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
-    <el-button :type="disabled?'':'primary'" size="small" @click="onshow" :disabled="disabled">{{ btnName ? $t(btnName) : $t('批量下架') }}</el-button>
+    <el-button :type="disabled?'':'primary'" :size="btn_size?btn_size:'small'" @click="onshow" :disabled="disabled">{{ btnName ? $t(btnName) : $t('批量下架') }}</el-button>
   </div>
 </template>
 
 <script>
 export default {
   name: "batchDown",
-  props:["rowData","disabled","btnName"],
+  props:["rowData","disabled","btnName","btn_size"],
   methods:{
     onshow(){
       this.onBatchDown()

+ 2 - 2
src/bgj/pointsbasedproducts/modules/batchUp.vue

@@ -1,13 +1,13 @@
 <template>
   <div>
-    <el-button :type="disabled?'':'primary'" size="small" @click="onshow" :disabled="disabled">{{ btnName ? $t(btnName) : $t('批量上架') }}</el-button>
+    <el-button :type="disabled?'':'primary'" :size="btn_size?btn_size:'small'" @click="onshow" :disabled="disabled">{{ btnName ? $t(btnName) : $t('批量上架') }}</el-button>
   </div>
 </template>
 
 <script>
 export default {
   name: "batchUp",
-  props:["rowData","disabled","btnName"],
+  props:["rowData","disabled","btnName","btn_size"],
   methods:{
     onshow(){
       this.onBatchUp()

+ 2 - 2
src/bgj/pointsbasedproducts/modules/counterExamine.vue

@@ -1,12 +1,12 @@
 <template>
   <div>
-    <el-button :type="disabled?'':'primary'" size="small" @click="onshow" :disabled="disabled">{{$t(`反 审`)}}</el-button>
+    <el-button :type="disabled?'':'primary'" :size="btn_size?btn_size:'small'" @click="onshow" :disabled="disabled">{{$t(`反 审`)}}</el-button>
   </div>
 </template>
 
 <script>
 export default {
-  props:["rowData","disabled"],
+  props:["rowData","disabled","btn_size"],
   name: "counterExamine",
   data(){
     return {

+ 3 - 2
src/bgj/pointsbasedproducts/modules/detail.vue

@@ -27,7 +27,7 @@
                 ></Edit>
                 <batchUp
                     v-if="
-                        mainData.status === '新建' &&
+                        mainData.status === '审核' &&
                         mainData.isonsale === 0 &&
                         tool.checkAuth($route.name, 'batchUp')
                     "
@@ -39,7 +39,7 @@
                 ></batchUp>
                 <batchDown
                     v-if="
-                        mainData.status === '新建' &&
+                        mainData.status === '审核' &&
                         mainData.isonsale === 1 &&
                         tool.checkAuth($route.name, 'batchDown')
                     "
@@ -77,6 +77,7 @@
                     size="mini"
                     :loading="deleteLoading"
                     v-if="mainData.status === '新建'"
+                    style="margin-right: 10px;"
                     >{{ $t(`删 除`) }}</el-button>
             </template>
             <div slot="slot0">

+ 2 - 2
src/bgj/pointsbasedproducts/modules/toExamine.vue

@@ -1,12 +1,12 @@
 <template>
   <div >
-    <el-button :type="disabled?'':'primary'"  size="small"  @click="onshow" :disabled="disabled">{{$t(`审 核`)}}</el-button>
+    <el-button :type="disabled?'':'primary'" :size="btn_size?btn_size:'small'"  @click="onshow" :disabled="disabled">{{$t(`审 核`)}}</el-button>
   </div>
 </template>
 
 <script>
 export default {
-  props:["rowData","disabled"],
+  props:["rowData","disabled","btn_size"],
   name: "toExamine",
   data(){
     return {

+ 36 - 0
src/bgj/staffpointsaccount/index.vue

@@ -30,7 +30,22 @@
           }}
         </div>
       </template>
+      <template v-slot:tbOpreation="scope">
+        <el-button size="small" type="text" @click="openDetail(scope.data.data)">{{ $t("查看明细") }}</el-button>
+      </template>
     </basicLayout>
+
+    <el-dialog
+      :visible.sync="detailVisible"
+      :title="$t('积分明细')"
+      width="70%"
+      append-to-body
+    >
+      <el-table :data="detailData" border stripe style="width: 100%" max-height="500">
+        <el-table-column v-for="col in detailLayout" :key="col.columnname" :prop="col.columnname" :label="$t(col.title)" :min-width="col.width || 150" show-overflow-tooltip>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
   </div>
 </template>
 
@@ -44,6 +59,10 @@ export default {
   data() {
     return {
       columns: [],
+      detailVisible: false,
+      detailData: [],
+      detailLayout: [],
+      currentRow: null,
     };
   },
   computed: {
@@ -61,6 +80,23 @@ export default {
       this.columns = this.$refs.list.columns;
       this.$refs.list.listData();
     },
+    async openDetail(row) {
+      this.currentRow = row;
+      this.detailVisible = true;
+      const res = await this.$api.requested({
+        id: 2026052510110906,
+        content: {
+          pageSize: 20,
+          pageNumber: 1,
+          pageSorting: "",
+          userid: row.userid,
+        },
+      });
+      if (res.data) {
+        this.detailData = res.data || [];
+        this.detailLayout = this.tool.tabelCol(this.$route.name)['detailTable'].tablecols
+      }
+    },
   },
 };
 </script>

+ 164 - 0
src/bgj/warrantyCard/index.vue

@@ -0,0 +1,164 @@
+<template>
+  <div>
+    <basicLayout
+      ref="basicLayout"
+      :oldFormPath="{
+        add:'bgj/warrantyCard/modules'
+      }"
+      tableName="listTable"
+      idName="sc_warrantycardid"
+      ownertable="sc_warrantycard"
+      :apiId="{query:2026052914363302}"
+      :options="options"
+      @onFixedClick="rows"
+      :specialKey="[]"
+      @checkboxCallBack="rows"
+      :autoQuery="false"
+      :detailPath="{
+        path:'/warrantyCardDetail'
+      }"
+      :isExport="false"
+      >
+      <template #titleRight>
+      </template>
+      <template #custom>
+        <div class="mt-10">
+          <label  class="search__label" >{{$t(`状态`)}}:</label>
+          <el-select class="inline-24" v-model="selectParam.status" :placeholder="$t(`请选择状态`)" @change="selectChange" size="small" clearable>
+            <el-option
+                v-for="item in statusData"
+                :key="item.value"
+                :label="$t(item.label)"
+                :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label" >{{$t(`生成时间`)}}:</label>
+          <el-date-picker
+              style="margin-right: 24px !important;"
+              size="small"
+              @change="selectChange"
+              value-format="yyyy-MM-dd"
+              v-model="dateSelect1"
+              type="daterange"
+              :range-separator="$t(`至`)"
+              :start-placeholder="$t(`开始日期`)"
+              :end-placeholder="$t(`结束日期`)"
+              clearable>
+          </el-date-picker>
+        </div>
+        <div class="mt-10">
+          <label class="search__label" >{{$t(`到期时间`)}}:</label>
+          <el-date-picker
+              style="margin-right: 24px !important;"
+              size="small"
+              @change="selectChange"
+              value-format="yyyy-MM-dd"
+              v-model="dateSelect2"
+              type="daterange"
+              :range-separator="$t(`至`)"
+              :start-placeholder="$t(`开始日期`)"
+              :end-placeholder="$t(`结束日期`)"
+              clearable>
+          </el-date-picker>
+        </div>
+      </template>
+      <template v-slot:tbList="scope">
+        <div>
+        <p v-if="scope.data.column.columnname === 'status'">
+          <span :style="tool.getStatusColor(scope.data.column.data[[scope.data.column.columnname]])" >{{$t(scope.data.column.data[[scope.data.column.columnname]])}}</span>
+        </p>
+        <p v-else-if="scope.data.column.columnname === 'province'">
+          <span>{{$t(scope.data.column.data['province'])}} - {{$t(scope.data.column.data['city'])}} - {{$t(scope.data.column.data['county'])}}</span>
+        </p>
+        <div v-else>{{ scope.data.column.data[scope.data.column.columnname]?scope.data.column.data[scope.data.column.columnname] : ''}}</div>
+        </div>
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      options:[],
+      statusData:[
+        {
+          value:'生效中',
+          label:'生效中'
+        },
+        {
+          value:'已过期',
+          label:'已过期'
+        }
+      ],
+      selectParam:{
+        status:'',
+        begdate:'',
+        enddate:'',
+        begdate2:'',
+        enddate2:''
+      },
+      rowData:[],
+      dateSelect1:'',
+      dateSelect2:''
+    }
+  },
+  components:{
+  },
+  methods:{
+    selectChange(){
+      if (this.dateSelect1 !== '' && this.dateSelect1 !== null){
+        this.selectParam.begdate = this.dateSelect1[0]
+        this.selectParam.enddate = this.dateSelect1[1]
+      }else {
+        this.selectParam.begdate = ''
+        this.selectParam.enddate = ''
+      }
+      if (this.dateSelect2 !== '' && this.dateSelect2 !== null){
+        this.selectParam.begdate2 = this.dateSelect2[0]
+        this.selectParam.enddate2 = this.dateSelect2[1]
+      }else {
+        this.selectParam.begdate2 = ''
+        this.selectParam.enddate2 = ''
+      }
+      this.$refs.basicLayout.param.content.pageNumber = 1
+      this.$refs.basicLayout.param.content.where = {
+        condition: "",
+        status: this.selectParam.status,
+        begdate: this.selectParam.begdate,
+        enddate: this.selectParam.enddate,
+        begdate2: this.selectParam.begdate2,
+        enddate2: this.selectParam.enddate2
+      }
+      this.$refs.basicLayout.listData()
+    },
+    rows(val){
+      console.log("点击")
+      console.log(val)
+      this.rowData = val
+    },
+    listData(){
+      this.$refs.basicLayout.param.content.where = {
+        condition: "",
+        status: this.selectParam.status,
+        begdate: this.selectParam.begdate,
+        enddate: this.selectParam.enddate,
+        begdate2: this.selectParam.begdate2,
+        enddate2: this.selectParam.enddate2
+      }
+      this.$refs.basicLayout.listData()
+    }
+  },
+  mounted() {
+    this.listData()
+  }
+}
+
+</script>
+<style>
+</style>
+<style scoped>
+</style>

+ 62 - 0
src/bgj/warrantyCard/modules/baseInfo.vue

@@ -0,0 +1,62 @@
+<template>
+    <div>
+        <div class="normal-margin">
+            <el-descriptions
+                :column="3"
+                :title="$t('基本信息')"
+                labelClassName="my-label"
+                contentClassName="my-content"
+                border
+            >
+                <el-descriptions-item
+                    v-for="(item, index) in detailInfo.baseInfo"
+                    :key="index"
+                    :label="$t(item.label)"
+                >
+                    <span :style="item.style ? item.style() : ''">{{
+                        item.value ? $t(item.value) : "--"
+                    }}</span>
+                </el-descriptions-item>
+            </el-descriptions>
+        </div>
+
+        <div class="normal-margin">
+            <el-descriptions
+                :column="3"
+                :title="$t('系统信息')"
+                labelClassName="my-label"
+                contentClassName="my-content"
+                border
+            >
+                <el-descriptions-item
+                    v-for="(item, index) in detailInfo.systemInfo"
+                    :key="index"
+                    :label="$t(item.label)"
+                    >{{
+                        item.value ? $t(item.value) : "--"
+                    }}</el-descriptions-item
+                >
+            </el-descriptions>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: "baseInfo",
+    props: ["detailInfo"],
+    detailInfo() {
+        return {};
+    },
+    mounted() {},
+    methods: {},
+};
+</script>
+
+<style scoped>
+/deep/.el-descriptions-item__label {
+    font-size: 14px;
+    color: rgb(163, 163, 163) !important;
+    white-space: nowrap;
+}
+</style>

+ 184 - 0
src/bgj/warrantyCard/modules/detail.vue

@@ -0,0 +1,184 @@
+<template>
+    <div>
+        <basicDetails
+            ref="details"
+            :titleText="mainData.cardno"
+            :editData="mainData"
+            :mainAreaData="mainAreaData"
+            turnPageId="2026052914465402"
+            idname="sc_warrantycardid"
+            ownertable="sc_warrantycard"
+            tags=""
+            :tabs="['详细信息']"
+            :column="5"
+            @pageChange="pageChange"
+            @onEditSuccess="queryMainData($route.query.id)"
+        >
+            <div slot="tags"></div>
+            <template slot="customOperation">
+            </template>
+            <div slot="slot0">
+                <baseInfo
+                    v-if="detailInfo"
+                    :detailInfo="detailInfo"
+                ></baseInfo>
+            </div>
+        </basicDetails>
+    </div>
+</template>
+
+<script>
+import BaseInfo from "./baseInfo";
+export default {
+    name: "detail",
+    data() {
+        return {
+            mainData: {},
+            mainAreaData: {},
+            detailInfo: "",
+        };
+    },
+    components: {
+        BaseInfo,
+    },
+    methods: {
+        async queryMainData() {
+            const res = await this.$api.requested({
+                id: 2026052914465402,
+                content: {
+                    nocache: true,
+                    sc_warrantycardid: this.$route.query.id,
+                },
+            });
+            this.mainData = res.data;
+            this.changeDataStructure();
+            console.log("this.mainData", this.mainData);
+        },
+        changeDataStructure() {
+            this.mainAreaData = [
+                {
+                    label: "质保卡号",
+                    value: this.mainData.cardno,
+                },
+                {
+                    label: "状态",
+                    value: this.mainData.status,
+                    style: () => {
+                        let color = this.tool.getStatusColor(this.mainData.status, true);
+                        return { color: color };
+                    },
+                },
+                {
+                    label: "客户姓名",
+                    value: this.mainData.name,
+                },
+                {
+                    label: "客户电话",
+                    value: this.mainData.phonenumber,
+                },
+                {
+                    label: "生成时间",
+                    value: this.mainData.createdate,
+                },
+                {
+                    label: "到期时间",
+                    value: this.mainData.enddate,
+                },
+                {
+                    label: "省市县",
+                    value: [this.mainData.province, this.mainData.city, this.mainData.county].filter(Boolean).join('-'),
+                },
+                {
+                    label: "详细地址",
+                    value: this.mainData.address,
+                },
+                {
+                    label: "来源工单号",
+                    value: this.mainData.billno,
+                },
+                
+                
+                {
+                    label: "归属经销商",
+                    value: this.mainData.enterprisename,
+                },
+                
+            ];
+            this.detailInfo = {
+                baseInfo: [
+                    {
+                        label: "质保卡号",
+                        value: this.mainData.cardno,
+                    },
+                    {
+                        label: "状态",
+                        value: this.mainData.status,
+                        style: () => {
+                            let color = this.tool.getStatusColor(this.mainData.status, true);
+                            return { color: color };
+                        },
+                    },
+                    {
+                        label: "客户姓名",
+                        value: this.mainData.name,
+                    },
+                    {
+                        label: "客户电话",
+                        value: this.mainData.phonenumber,
+                    },
+                    {
+                        label: "省市县",
+                        value: [this.mainData.province, this.mainData.city, this.mainData.county].filter(Boolean).join('-'),
+                    },
+                    {
+                        label: "详细地址",
+                        value: this.mainData.address,
+                    },
+                    {
+                        label: "来源工单号",
+                        value: this.mainData.billno,
+                    },
+                    {
+                        label: "归属经销商",
+                        value: this.mainData.enterprisename,
+                    },
+                    {
+                        label: "服务人员",
+                        value: this.mainData.leadername,
+                    },
+                    {
+                        label: "服务人员电话",
+                        value: this.mainData.leaderphonenumber,
+                    },
+                    {
+                        label: "工单签收时间",
+                        value: this.mainData.begdate,
+                    },
+                ],
+                systemInfo: [
+                    { label: "生成时间", value: this.mainData.createdate },
+                    { label: "到期时间", value: this.mainData.enddate },
+                    { label: "创建人", value: this.mainData.createby },
+                    { label: "最近编辑人", value: this.mainData.changeby },
+                    { label: "最近编辑时间", value: this.mainData.changedate },
+                ],
+            };
+        },
+        pageChange(id, rowindex, tabIndex) {
+            this.flag = false;
+            tabIndex = this.$route.query.tabIndex;
+            this.$router.replace({
+                path: "/warrantyCardDetail",
+                query: { id: id, rowindex: rowindex, tabIndex: tabIndex },
+            });
+            this.queryMainData(id);
+        },
+    },
+    mounted() {
+        this.queryMainData(this.$route.query.id);
+    },
+    created() {},
+};
+</script>
+
+<style scoped></style>

+ 23 - 0
src/router/bgj.js

@@ -241,6 +241,29 @@ const bgj = [
       keeproute: true,
     },
     component: () => import(/* webpackChunkName: "about" */ '@/bgj/personnelmanagement/index'),
+  },
+  {
+    path: '/warrantyCard',
+    name: 'warrantyCard',
+    meta: {
+      title: '质保卡管理',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/bgj/warrantyCard/index'),
+    children: [
+      {
+        path: '/warrantyCardDetail',
+        name: 'warrantyCard',
+        meta: {
+          title: '质保卡详情',
+          ast_nav: true,
+          keeproute: true,
+        },
+        component: () =>
+          import(/* webpackChunkName: "about" */ '@/bgj/warrantyCard/modules/detail'),
+      },
+    ],
   }
 ];
 export default bgj;