|
@@ -6,6 +6,7 @@
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">类型</view>
|
|
<view class="tui-title">类型</view>
|
|
|
|
|
+ <button class="admin-button-com middle" @tap="form.type = 6" :class="form.type == 6? 'blue' : 'default'">物品</button>
|
|
|
<button class="admin-button-com middle" @tap="form.type = 3" :class="form.type == 3? 'blue' : 'default'">伙食</button>
|
|
<button class="admin-button-com middle" @tap="form.type = 3" :class="form.type == 3? 'blue' : 'default'">伙食</button>
|
|
|
<button class="admin-button-com middle" @tap="form.type = 0" :class="form.type == 0 ? 'blue' : 'default'">店租</button>
|
|
<button class="admin-button-com middle" @tap="form.type = 0" :class="form.type == 0 ? 'blue' : 'default'">店租</button>
|
|
|
<button class="admin-button-com middle" @tap="form.type = 1" :class="form.type == 1? 'blue' : 'default'">水电</button>
|
|
<button class="admin-button-com middle" @tap="form.type = 1" :class="form.type == 1? 'blue' : 'default'">水电</button>
|
|
@@ -14,14 +15,6 @@
|
|
|
<button class="admin-button-com middle" @tap="form.type = 5" :class="form.type == 5? 'blue' : 'default'">其它</button>
|
|
<button class="admin-button-com middle" @tap="form.type = 5" :class="form.type == 5? 'blue' : 'default'">其它</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :arrow="true">
|
|
|
|
|
- <view class="tui-title">支付</view>
|
|
|
|
|
- <picker mode="selector" :value="form.payWay" :range="payWayList" range-key="name" @change="payWayChange" class="tui-input" >
|
|
|
|
|
- <input v-model="form.payWay" name="payWay" type="text" hidden />
|
|
|
|
|
- <view style="padding:6upx 0 6upx 0;">{{payWayList[payWayindex].name}}</view>
|
|
|
|
|
- </picker>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">金额</view>
|
|
<view class="tui-title">金额</view>
|
|
|
<input v-model="form.amount" type="digit" @focus="form.amount=''" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="amount" placeholder="请填写" />
|
|
<input v-model="form.amount" type="digit" @focus="form.amount=''" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="amount" placeholder="请填写" />
|
|
@@ -33,6 +26,37 @@
|
|
|
<textarea v-model="form.remark" @focus="form.remark=''" style="height:80upx;" class="tui-textarea remark" name="remark" placeholder-class="phcolor" placeholder="选填" />
|
|
<textarea v-model="form.remark" @focus="form.remark=''" style="height:80upx;" class="tui-textarea remark" name="remark" placeholder-class="phcolor" placeholder="选填" />
|
|
|
</view>
|
|
</view>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true">
|
|
|
|
|
+ <div class="tui-title">付款人</div>
|
|
|
|
|
+ <picker mode="selector" :value="form.getStaffId" :range="staffList" range-key="name" @change="kdChange" class="tui-input" >
|
|
|
|
|
+ <input v-model="form.getStaffId" name="getStaffId" type="text" hidden />
|
|
|
|
|
+ <div style="padding:6upx 0 6upx 0;">{{form.getStaffName}}</div>
|
|
|
|
|
+ </picker>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true">
|
|
|
|
|
+ <view class="tui-title">付款方式</view>
|
|
|
|
|
+ <picker mode="selector" :value="form.payWay" :range="payWayList" range-key="name" @change="payWayChange" class="tui-input" >
|
|
|
|
|
+ <input v-model="form.payWay" name="payWay" type="text" hidden />
|
|
|
|
|
+ <view style="padding:6upx 0 6upx 0;">{{payWayList[payWayindex].name}}</view>
|
|
|
|
|
+ </picker>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <div class="tui-title">报销</div>
|
|
|
|
|
+ <radio-group class="tui-input" @change="bxChange">
|
|
|
|
|
+ <label class="list" for="fixedLink">
|
|
|
|
|
+ <radio id="fixedLink" value="0" :checked="form.bx == 0" style="transform: scale(0.7,0.7);" />
|
|
|
|
|
+ <span class="checkbox-text" style="font-size:30upx;">未报销</span>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ <label class="list" for="dimLink">
|
|
|
|
|
+ <radio id="dimLink" value="1" :checked="form.bx == 1" style="transform: scale(0.7,0.7);" />
|
|
|
|
|
+ <span class="checkbox-text" style="font-size:30upx;">已报销</span>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </radio-group>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
<view class="confirm-btn">
|
|
<view class="confirm-btn">
|
|
|
<view style="margin-bottom:20upx;font-size:33upx;color:red;font-weight:bold;">当前在:{{shopInfo.shopName}}</view>
|
|
<view style="margin-bottom:20upx;font-size:33upx;color:red;font-weight:bold;">当前在:{{shopInfo.shopName}}</view>
|
|
@@ -45,7 +69,8 @@
|
|
|
<script>
|
|
<script>
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import { addExpend} from '@/api/expend'
|
|
import { addExpend} from '@/api/expend'
|
|
|
-import {currentShop} from "@/api/shop";
|
|
|
|
|
|
|
+import {currentShop} from "@/api/shop"
|
|
|
|
|
+import { getAllStaff } from "@/api/shop-admin"
|
|
|
export default {
|
|
export default {
|
|
|
name: "addExpend",
|
|
name: "addExpend",
|
|
|
components: {
|
|
components: {
|
|
@@ -54,15 +79,18 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
form:{
|
|
form:{
|
|
|
- //0店租 1水电 2物业 3伙食 4房租 5其它
|
|
|
|
|
- type:3,
|
|
|
|
|
|
|
+ type:6,
|
|
|
amount:'',
|
|
amount:'',
|
|
|
remark:'',
|
|
remark:'',
|
|
|
- payWay:0
|
|
|
|
|
|
|
+ payWay:0,
|
|
|
|
|
+ getStaffId:0,
|
|
|
|
|
+ getStaffName:'',
|
|
|
|
|
+ bx:-1
|
|
|
},
|
|
},
|
|
|
payWayList:[{name:"线下微信",id:0},{name:"现金",id:4},{name:"线下支付宝",id:1},{name:"银行卡",id:5}],
|
|
payWayList:[{name:"线下微信",id:0},{name:"现金",id:4},{name:"线下支付宝",id:1},{name:"银行卡",id:5}],
|
|
|
payWayindex:0,
|
|
payWayindex:0,
|
|
|
- shopInfo:{shopName:''}
|
|
|
|
|
|
|
+ shopInfo:{shopName:''},
|
|
|
|
|
+ staffList:[]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad () {
|
|
onLoad () {
|
|
@@ -71,6 +99,27 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ bxChange(e) {
|
|
|
|
|
+ this.form.bx = e.detail.value;
|
|
|
|
|
+ },
|
|
|
|
|
+ init(){
|
|
|
|
|
+
|
|
|
|
|
+ //获取所有在职员工
|
|
|
|
|
+ getAllStaff().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.staffList = res.data.list
|
|
|
|
|
+ if(!this.$util.isEmpty(this.staffList)){
|
|
|
|
|
+ for(const ele of this.staffList){
|
|
|
|
|
+ if(this.getLoginInfo.shopAdminId == ele.id){
|
|
|
|
|
+ this.form.getStaffId = ele.id
|
|
|
|
|
+ this.form.getStaffName = ele.name
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
payWayChange(e){
|
|
payWayChange(e){
|
|
|
let index = e.detail.value
|
|
let index = e.detail.value
|
|
|
this.payWayindex = index
|
|
this.payWayindex = index
|
|
@@ -80,6 +129,10 @@ export default {
|
|
|
if(Number(this.form.amount) <= 0){
|
|
if(Number(this.form.amount) <= 0){
|
|
|
this.$msg('请填写金额')
|
|
this.$msg('请填写金额')
|
|
|
return false
|
|
return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.form.bx == -1){
|
|
|
|
|
+ this.$msg('请选择报销状态')
|
|
|
|
|
+ return false
|
|
|
}
|
|
}
|
|
|
this.$util.confirmModal({content:'确认提交?'},() => {
|
|
this.$util.confirmModal({content:'确认提交?'},() => {
|
|
|
addExpend(this.form).then(res=>{
|
|
addExpend(this.form).then(res=>{
|