|
|
@@ -20,7 +20,7 @@
|
|
|
<tui-list-cell class="line-cell remark-wrap" :hover="false">
|
|
|
<view class="tui-title">备注</view>
|
|
|
<view class="tui-input">
|
|
|
- <textarea v-model="form.remark" @focus="form.remark=''" style="height:50upx;" class="tui-textarea remark" name="remark" placeholder-class="phcolor" placeholder="选填" />
|
|
|
+ <textarea v-model="form.remark" @focus="form.remark=''" style="height:30upx;" class="tui-textarea remark" name="remark" placeholder-class="phcolor" placeholder="选填" />
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
@@ -52,7 +52,13 @@
|
|
|
<span class="checkbox-text" style="font-size:30upx;">已报销</span>
|
|
|
</label>
|
|
|
</radio-group>
|
|
|
- </tui-list-cell>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
+ <view class="tui-title">账单日期</view>
|
|
|
+ <view class="uni-input" v-if="form.historyDate==''" style="color:#CCCCCC;" @click="bindHistoryDateChange">请选择,默认当天</view>
|
|
|
+ <view class="uni-input" @click="bindHistoryDateChange">{{form.historyDate}}</view>
|
|
|
+ </tui-list-cell>
|
|
|
|
|
|
</view>
|
|
|
<view class="confirm-btn">
|
|
|
@@ -71,6 +77,7 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
+ <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="showPicker = false" />
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -79,10 +86,12 @@ import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import { addExpend,getTypeList } from '@/api/expend'
|
|
|
import {currentShop} from "@/api/shop"
|
|
|
import { getAllStaff } from "@/api/shop-admin"
|
|
|
+import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
|
|
|
export default {
|
|
|
name: "addExpend",
|
|
|
components: {
|
|
|
- TuiListCell
|
|
|
+ TuiListCell,
|
|
|
+ MxDatePicker
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -94,13 +103,15 @@ export default {
|
|
|
payWay:0,
|
|
|
getStaffId:0,
|
|
|
getStaffName:'',
|
|
|
- bx:-1
|
|
|
+ bx:-1,
|
|
|
+ historyDate:""
|
|
|
},
|
|
|
payWayList:[{name:"线下微信",id:0},{name:"现金",id:4},{name:"线下支付宝",id:1},{name:"银行卡",id:5}],
|
|
|
payWayindex:0,
|
|
|
shopInfo:{shopName:''},
|
|
|
staffList:[],
|
|
|
- typeList:[]
|
|
|
+ typeList:[],
|
|
|
+ showPicker: false
|
|
|
};
|
|
|
},
|
|
|
onLoad () {
|
|
|
@@ -109,6 +120,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ bindHistoryDateChange(){
|
|
|
+ this.showPicker = true
|
|
|
+ },
|
|
|
+ confirmPicker(e) {
|
|
|
+ this.form.historyDate = e.value
|
|
|
+ this.showPicker = false
|
|
|
+ },
|
|
|
payManChange(e){
|
|
|
let index = e.detail.value
|
|
|
if(!this.$util.isEmpty(this.staffList)){
|
|
|
@@ -134,9 +152,7 @@ export default {
|
|
|
this.form.bx = e.detail.value;
|
|
|
},
|
|
|
init(){
|
|
|
-
|
|
|
let that = this
|
|
|
-
|
|
|
getAllStaff().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.staffList = res.data.list
|
|
|
@@ -150,19 +166,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
getTypeList().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
that.typeList = res.data.list ? res.data.list : []
|
|
|
- // if(!that.$util.isEmpty(that.typeList)){
|
|
|
- // let current = that.typeList[0]
|
|
|
- // that.form.type = current.id
|
|
|
- // that.form.typeName = current.name
|
|
|
- // that.$forceUpdate()
|
|
|
- // }
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
payWayChange(e){
|
|
|
let index = e.detail.value
|
|
|
@@ -181,10 +189,10 @@ export default {
|
|
|
this.$util.confirmModal({content:'确认提交?'},() => {
|
|
|
addExpend(this.form).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
- this.$msg("提交成功");
|
|
|
- setTimeout(function(){
|
|
|
- uni.navigateBack({ delta: 1 })
|
|
|
- },1000)
|
|
|
+ this.$msg("提交成功");
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.navigateBack({ delta: 1 })
|
|
|
+ },1000)
|
|
|
}
|
|
|
})
|
|
|
})
|