wtt
7 天以前 7f62df222a1bbaef07183e588e3cf0469b9e65bb
pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery.vue
@@ -48,6 +48,9 @@
        </view>
        <!-- 工作联系单 列表 -->
        <view>
        </view>
        <view class="list" v-for="(item,index) in BillsDisplay" :key="index">
            <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;"
                @tap="showDetail = showDetail==index?-1:index">
@@ -101,7 +104,13 @@
                </view>
            </uni-card>
        </view>
        <view class="over" v-if="BillsDisplay.length == 0">暂无数据</view>
        <template v-if="BillsDisplay.length == 0">
            <view class="over">暂无数据</view>
        </template>
        <template v-else>
            <view class="over" v-if="!readCompelete">正在获取数据...</view>
            <view class="over" v-if="readCompelete">数据已读完...</view>
        </template>
    </view>
</template>
@@ -132,7 +141,17 @@
                sWhere: "",
                showDetail: -1,
                operations: -1,
                readCompelete: false,
                page: 1,
                size: 20,
            };
        },
        // 触底加载
        onReachBottom() {
            this.page++;
            this.onSearchClickHandler()
        },
        methods: {
            onDateRangePickerChangeHandler({
@@ -175,7 +194,7 @@
                }
            },
            onSearchClickHandler() {
               this.switchTab(this.tabs)
                this.switchTab(this.tabs)
            },
            onResetClickHandler() {
                this.dateRangePicker = ["任意间隔", "今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"],
@@ -186,12 +205,18 @@
                    this.getWorkLinkList()
            },
            switchTab(tabIndex) {
                this.tabs = tabIndex
                if(tabIndex == this.tabs){
                }else {
                    this.tabs = tabIndex
                    this.BillsDisplay= []
                    this.page = 1
                }
                this.sWhere = ''
                switch (tabIndex) {
                    case 0:
                        this.sWhere =
                            ` and (接收人 = '${getUserInfo()['HEmpName']}' or 抄送接收人 = '${getUserInfo()['HEmpName']}') and 阅读状态 = '未阅'`
                            ` and (抄送接收人 = '${getUserInfo()['HEmpName']}') and 阅读状态 = '未阅'`
                        break;
                    case 1:
                        this.sWhere = ` and 接收人 = '${getUserInfo()['HEmpName']}'`
@@ -208,14 +233,17 @@
                this.getWorkLinkList()
            },
            async getWorkLinkList() {
                this.sWhere += ` and 日期 >= CONVERT(VARCHAR(10), '${this.startDate}', 23) and 日期 <= CONVERT(VARCHAR(10), '${this.endDate}', 23)`
                this.sWhere +=
                    ` and 日期 >= CONVERT(VARCHAR(10), '${this.startDate}', 23) and 日期 <= CONVERT(VARCHAR(10), '${this.endDate}', 23)`
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: 'Sc_MESTransFerWorkBill/GetOA_WorkLinkBillList',
                        data: {
                            sWhere: this.sWhere,
                            user: getUserInfo()["Czymc"]
                            user: getUserInfo()["Czymc"],
                            page: this.page,
                            size: this.size
                        }
                    })
@@ -228,7 +256,7 @@
                    if (count == 1) {
                        console.log('data: ', data);
                        this.BillsDisplay = data
                        this.BillsDisplay.push(...data)
                        let fieldList = CommonUtils.fieldListFilterRole({