Browse Source

上传修改

master
前端-胡立永 2 months ago
parent
commit
7e94e9d80a
4 changed files with 92 additions and 34 deletions
  1. +7
    -1
      api/model/workEntryInfo.js
  2. +56
    -16
      pages_order/kepp/AnnualExpenditure.vue
  3. +6
    -10
      pages_order/kepp/addWorkEntryRecords.vue
  4. +23
    -7
      pages_order/kepp/keepAccountsDetail.vue

+ 7
- 1
api/model/workEntryInfo.js View File

@ -46,12 +46,18 @@ const api = {
method: 'GET', method: 'GET',
auth: true, auth: true,
}, },
//记工记账-全年收支
//查询记工记录
notebookQueryWork: { notebookQueryWork: {
url: '/employ/notebook/queryWork', url: '/employ/notebook/queryWork',
method: 'GET', method: 'GET',
auth: true, auth: true,
}, },
//查询全年收支统计
notebookQueryBillAmount: {
url: '/employ/notebook/queryBillAmount',
method: 'GET',
auth: true,
},
} }
export default api export default api

+ 56
- 16
pages_order/kepp/AnnualExpenditure.vue View File

@ -3,17 +3,15 @@
<view class="page"> <view class="page">
<navbar title="全年收支" leftClick @leftClick="$utils.navigateBack" /> <navbar title="全年收支" leftClick @leftClick="$utils.navigateBack" />
<view class="page-two"> <view class="page-two">
<view class="option">
<select class="select">
<option value="option1">选择项目</option>
</select>
<view class="option"
@click="$refs.notebookListPicker.open()">
{{ notebook.title }}
</view> </view>
<view class="wire"></view> <view class="wire"></view>
<view class="select-date">
<select class="select">
<option value="option1">2024</option>
</select>
<view class="select-date"
@click="$refs.notebookListPicker.open()">
2024
</view> </view>
<view class="card"> <view class="card">
@ -21,7 +19,7 @@
<image src="../../static/image/keepAccounts/BlueWallet.png" mode="aspectFill" /> <image src="../../static/image/keepAccounts/BlueWallet.png" mode="aspectFill" />
<view> <view>
<view>总收入()</view> <view>总收入()</view>
<view style="color: #3889FF;">1223</view>
<view style="color: #3889FF;">{{ countNumber.incomeCount }}</view>
</view> </view>
</view> </view>
@ -29,19 +27,24 @@
<image src="../../static/image/keepAccounts/YellowWallet.png" mode="aspectFill" /> <image src="../../static/image/keepAccounts/YellowWallet.png" mode="aspectFill" />
<view> <view>
<view>总支出()</view> <view>总支出()</view>
<view style="color: #FD961A;">1223</view>
<view style="color: #FD961A;">{{ countNumber.expenditureCount }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="cell" style="margin-top: 40rpx;"> <view class="cell" style="margin-top: 40rpx;">
<uv-cell v-for="(item,index) in list"
<uv-cell v-for="(item,index) in list"
:key="index" :key="index"
:label="item.billDate" :label="item.billDate"
title="佣金收入"
:value="`${typeNo[item.type]}${item.amount}`"></uv-cell>
:title="bill.typeTitle[item.type]"
:value="`${bill.typeNo[item.type]}${item.amount}`"></uv-cell>
</view> </view>
</view> </view>
<uv-picker ref="notebookListPicker"
keyName="title"
:columns="[notebookList]"
itemHeight="80"
@confirm="notebookListConfirm"></uv-picker>
</view> </view>
</template> </template>
@ -53,16 +56,53 @@
return { return {
mixinsListApi : 'queryBill', mixinsListApi : 'queryBill',
apiType : '', apiType : '',
typeNo : ['+', '-'],
bill : {
typeNo : ['+', '-'],
typeTitle : ['收入', '支出'],
},
countNumber : {},
notebookList : [],
notebook : {
title : '选择项目',
},
} }
}, },
onLoad({apiType}) { onLoad({apiType}) {
this.apiType = apiType this.apiType = apiType
this.mixinsListApi += apiType || '' this.mixinsListApi += apiType || ''
this.getCommonQueryNotebookList()
},
onShow() {
this.notebookQueryBillAmount()
},
onPullDownRefresh() {
this.notebookQueryBillAmount()
}, },
onShow() {},
methods: { methods: {
notebookQueryBillAmount(){
this.$api('notebookQueryBillAmount',
this.queryParams, res => {
if(res.code == 200){
this.countNumber = res.result
}
})
},
getCommonQueryNotebookList(){
this.$api('commonQueryNotebookList', {
pageNo: 1,
pageSize: 9999999,
}, res => {
if(res.code == 200){
this.notebookList = res.result.records
}
})
},
notebookListConfirm(e){
this.notebook = e.value[0]
this.queryParams.notebookId = this.notebook.id
this.getData()
this.notebookQueryBillAmount()
},
} }
} }
</script> </script>


+ 6
- 10
pages_order/kepp/addWorkEntryRecords.vue View File

@ -13,23 +13,19 @@
isLink isLink
></uv-cell> ></uv-cell>
<view class="form-sheet-cell">
<!-- <view class="form-sheet-cell">
<view class="label"> <view class="label">
上班时间 上班时间
</view> </view>
<!-- <input placeholder="请输入上班时间"
type="number"
v-model="form.phone" /> -->
<uv-number-box v-model="form.worktime" <uv-number-box v-model="form.worktime"
:step="0.5" :step="0.5"
:min="0.5" :min="0.5"
></uv-number-box> ></uv-number-box>
</view>
</view> -->
<view class="form-sheet-cell"> <view class="form-sheet-cell">
<view class="label"> <view class="label">
加班时间
工作时间
</view> </view>
<!-- <input placeholder="请输入上班时间" <!-- <input placeholder="请输入上班时间"
type="number" type="number"
@ -93,11 +89,11 @@
this.form.workDate = this.$dayjs(e.value).format('YYYY-MM-DD') this.form.workDate = this.$dayjs(e.value).format('YYYY-MM-DD')
}, },
submit(){ submit(){
this.form.overtime = String(this.form.overtime)
// this.form.overtime = String(this.form.overtime)
if(this.$utils.verificationAll(this.form, { if(this.$utils.verificationAll(this.form, {
workDate : '请选择记工日期',// workDate : '请选择记工日期',//
worktime : '请输入上班时长',//
overtime : '请输入加班时长',
// worktime : '',//
overtime : '请输入工作时长',
})){ })){
return return
} }


+ 23
- 7
pages_order/kepp/keepAccountsDetail.vue View File

@ -11,13 +11,22 @@
activeStyle="color: #3796F8;"></uv-tabs> activeStyle="color: #3796F8;"></uv-tabs>
</view> </view>
<view class="page-two"> <view class="page-two">
<view class="cell" style="margin-top: 40rpx;">
<view class="cell" style="margin-top: 40rpx;"
v-if="apiIndex == 0">
<uv-cell v-for="(item,index) in list" <uv-cell v-for="(item,index) in list"
:key="index" :key="index"
:label="item.billDate" :label="item.billDate"
title="佣金收入"
:value="`${typeNo[item.type]}${item.amount}`"></uv-cell>
:title="bill.typeTitle[item.type]"
:value="`${bill.typeNo[item.type]}${item.amount}`"></uv-cell>
</view>
<view class="cell" style="margin-top: 40rpx;"
v-if="apiIndex == 1">
<uv-cell v-for="(item,index) in list"
:key="index"
:label="item.workDate"
:title="`工作${item.overtime}小时`"
:value="item.remarks"></uv-cell>
</view> </view>
</view> </view>
@ -44,7 +53,12 @@
}, },
], ],
id : 0, id : 0,
typeNo : ['+', '-'],
bill : {
typeNo : ['+', '-'],
typeTitle : ['收入', '支出'],
},
apiIndex : 0,
apiList : ['queryBill', 'notebookQueryWork'],
} }
}, },
onLoad({apiType, id}) { onLoad({apiType, id}) {
@ -52,12 +66,14 @@
this.queryParams.employNoteBookId = id this.queryParams.employNoteBookId = id
this.apiType = apiType this.apiType = apiType
// this.mixinsListApi += apiType || '' // this.mixinsListApi += apiType || ''
this.mixinsListApi = this.apiList[this.apiIndex]
}, },
onShow() {}, onShow() {},
methods: { methods: {
clickTabsType({index}){ clickTabsType({index}){
console.log(index);
this.mixinsListApi = ['queryBill', 'notebookQueryWork'][index]
this.list = []
this.apiIndex = index
this.mixinsListApi = this.apiList[this.apiIndex]
this.getData() this.getData()
}, },
} }


Loading…
Cancel
Save