wangfukang 3 years ago
parent
commit
b332bf4bde
  1. BIN
      pages/.DS_Store
  2. 65
      pages/index/feedBack.vue
  3. 11
      pages/index/index.vue
  4. 3
      pages/inventory/addGoods.vue
  5. 2
      pages/rebate/rebateShare.vue
  6. 19
      pages/staff/clock/clock.vue
  7. 58
      pages/staff/signRule/signRule.vue

BIN
pages/.DS_Store

Binary file not shown.

65
pages/index/feedBack.vue

@ -3,15 +3,15 @@
<view> <view>
<view class="formBox"> <view class="formBox">
<uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="85px"> <uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="85px">
<uni-forms-item label="图片" name="productPicture"> <uni-forms-item label="问题图片" name="productPicture">
<view v-if="formData.productPicture !=''"> <view v-if="formData.productPicture !=''">
<img :src="formData.productPicture" alt="" class="upload-img"> <img :src="formData.productPicture" alt="" class="upload-img">
</view> </view>
<u-upload :fileList="formData.productPicture" @afterRead="afterRead" @delete="deletePic" name="1" multiple <u-upload :fileList="formData.productPicture" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1"></u-upload> :maxCount="1"></u-upload>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="描述" name="productIntro"> <uni-forms-item label="问题说明" name="productIntro">
<uni-easyinput type="textarea" autoHeight v-model="formData.productIntro" placeholder="请简要说明问题" <uni-easyinput type="textarea" autoHeight v-model="formData.productIntro" placeholder="请简要描述问题"
trim="all" /> trim="all" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
@ -19,6 +19,7 @@
<u-button type="primary" @tap.stop="submit()">保存</u-button> <u-button type="primary" @tap.stop="submit()">保存</u-button>
</view> </view>
<!-- <u-modal v-model="show" :content="content"></u-modal> -->
</view> </view>
</template> </template>
@ -26,11 +27,28 @@
export default { export default {
data() { data() {
return { return {
fileList1: [],
formData: { formData: {
productPicture: [], productPicture: [],
productIntro: '' productIntro: ''
},
categoryList: [],
productId:'',
arrtList: [],
arrtChange: [],
dataList:[],
rules: {
productIntro: {
rules: [{
required: true,
errorMessage: '请简要描述问题',
}, ],
}
} }
} }
},
onLoad(option) {
}, },
methods: { methods: {
// 删除图片 // 删除图片
@ -42,7 +60,8 @@
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file) let lists = [].concat(event.file)
if (this.formData.productPicture == undefined) this.formData.productPicture = []; if (this.formData.productPicture == undefined) this.formData.productPicture = [];
console.log(this[`fileList${event.name}`])
let fileListLen = this[`fileList${event.name}`].length let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => { lists.map((item) => {
@ -84,22 +103,22 @@
} }
}); });
}) })
},
categoryChange(e) {
}, },
// 触发提交表单 // 触发提交表单
submit() { submit() {
let that = this; let that = this;
let url = '' let url = ''
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
if(that.dataList !=''){ that.tui.request('/app/problemFeedback/saveOrUpdateProblemFeedback', "post", {
url = '/app/product/edit' problemPicture:that.formData.productPicture,
res.id = that.dataList.id problemContent:that.formData.productIntro
}else{ }, false, false).then((res1) => {
url = '/app/product/save'
}
that.tui.request(url, "post", res, false, false).then((res1) => {
if (res1.code == 200) { if (res1.code == 200) {
uni.navigateBack({ uni.navigateBack({
delta: 2 delta: 2
}) })
} else { } else {
uni.showToast({ uni.showToast({
@ -123,6 +142,26 @@
border-radius: 14rpx; border-radius: 14rpx;
box-shadow: 0px 1px 10px 2px #e2e2e2; box-shadow: 0px 1px 10px 2px #e2e2e2;
background-color: #fff; background-color: #fff;
.uni-data-select {
width: 100%;
}
.attrs {
text {
display: inline-block;
border: 1px solid $u-primary;
padding: 7px 20rpx;
margin: 20rpx;
background-color: #fff;
color: $u-primary;
}
.checkedText {
background-color: $u-primary;
color: #fff;
}
}
} }
.upload-img{ .upload-img{
width: 160rpx; width: 160rpx;

11
pages/index/index.vue

@ -205,13 +205,14 @@
// }, // },
onShow() { onShow() {
this.shopName = uni.getStorageSync('shopName') this.shopName = uni.getStorageSync('shopName')
this.type = uni.getStorageSync('type') this.type = uni.getStorageSync('type')
this.getSaleInfo()
this.getServerData();
this.getOrderInfoList();
this.getWaitCount()
}, },
onLoad() { onLoad() {
this.getSaleInfo()
this.getServerData();
this.getOrderInfoList();
this.getWaitCount()
}, },
methods: { methods: {
getWaitCount() { getWaitCount() {

3
pages/inventory/addGoods.vue

@ -151,7 +151,8 @@
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file) let lists = [].concat(event.file)
if (this.formData.productPicture == undefined) this.formData.productPicture = []; if (this.formData.productPicture == undefined) this.formData.productPicture = [];
console.log(this[`fileList${event.name}`])
let fileListLen = this[`fileList${event.name}`].length let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => { lists.map((item) => {

2
pages/rebate/rebateShare.vue

@ -43,7 +43,7 @@
.content { .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/abdc5c897c4f4fe198b74091a708030b.jpg') no-repeat; background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/352c2490d88b47ac84bf13bfa046abcf.png') no-repeat;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
overflow: hidden; overflow: hidden;

19
pages/staff/clock/clock.vue

@ -40,8 +40,7 @@
</view> </view>
</template> </template>
<script> <script>
import amap from '../../../common/ossutil/amap-wx.130.js'
import { import {
mapState mapState
} from 'vuex' } from 'vuex'
@ -75,15 +74,15 @@
}) })
}, },
onClock() { onClock() {
const amapObject = new amap.AMapWX({ key: 'f06653d65bcefa97e94ab08917389842' }) uni.getLocation({
amapObject.getRegeo({ type: 'wgs84',
success: (res) => { isHighAccuracy:true,
accuracy:'best',
}, success: function (res) {
fail: (err) => { console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
} }
}) });
// if (!this.isClock) { // if (!this.isClock) {
// this.tui.request("/app/clockIn/", "get", { // this.tui.request("/app/clockIn/", "get", {
// userId: this.userId // userId: this.userId

58
pages/staff/signRule/signRule.vue

@ -13,9 +13,13 @@
<view class="uni-input">{{addForm.endTime}}</view> <view class="uni-input">{{addForm.endTime}}</view>
</picker> </picker>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="定位" required> <uni-forms-item label="定位" name="latitude" required>
<input type="text" v-model="addForm.latitude + ','+addForm.longitude" style="text-align:center;width:70%;border: 1px solid #eee;height: 72rpx;line-height: 72rpx !important;" disabled placeholder="获取位置用于员工打卡"> <input type="text" v-model="addForm.latitude + ','+addForm.longitude" style="text-align:center;width:70%;border: 1px solid #eee;height: 72rpx;line-height: 72rpx !important;" disabled placeholder="获取位置用于员工打卡">
<view class="dw-btn" @tap="clockPosi">一键定位</view> <view class="dw-btn" @tap="clockPosi">一键定位</view>
</uni-forms-item>
<uni-forms-item label="打卡范围" name="categoryId" required>
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId"
placeholder="请选择打卡范围"></uni-data-select>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<u-button type="primary" @click="onFormSubmit">保存</u-button> <u-button type="primary" @click="onFormSubmit">保存</u-button>
@ -23,8 +27,7 @@
</view> </view>
</template> </template>
<script> <script>
import amap from '../../../common/ossutil/amap-wx.130.js'
export default { export default {
data() { data() {
return { return {
@ -32,7 +35,32 @@
startTime: '06:00', startTime: '06:00',
endTime: '14:00', endTime: '14:00',
latitude:'', latitude:'',
longitude:'' longitude:'',
categoryId: '',
},
categoryList: [{
value: 1,
text: '100米'
},{
value: 2,
text: '200米'
},{
value: 3,
text: '500米'
}],
rules: {
categoryId: {
rules: [{
required: true,
errorMessage: '请选择打卡范围',
}],
},
latitude: {
rules: [{
required: true,
errorMessage: '请定位店铺位置',
}],
}
} }
} }
}, },
@ -44,16 +72,17 @@
this.time = e.detail.value; this.time = e.detail.value;
}, },
clockPosi(){ clockPosi(){
const amapObject = new amap.AMapWX({ key: 'f06653d65bcefa97e94ab08917389842' }) let that = this;
amapObject.getRegeo({ uni.getLocation({
success: (res) => { type: 'wgs84',
this.addForm.latitude = res[0].latitude isHighAccuracy:true,
this.addForm.longitude = res[0].longitude accuracy:'best',
}, success: function (res) {
fail: (err) => { console.log(res)
that.addForm.latitude = res.latitude
that.addForm.longitude = res.longitude
} }
}) });
}, },
onFormSubmit() { onFormSubmit() {
this.$refs.addForm.validate().then(async () => { this.$refs.addForm.validate().then(async () => {
@ -106,5 +135,8 @@
text-align: center; text-align: center;
background: #088FEB; background: #088FEB;
color: #fff; color: #fff;
}
.uni-data-select {
width: 100%;
} }
</style> </style>
Loading…
Cancel
Save