|
|
@@ -0,0 +1,499 @@
|
|
|
+<template>
|
|
|
+ <view class="affirm-page">
|
|
|
+ <view class="affirm-view overscroll">
|
|
|
+ <!-- 门店信息 -->
|
|
|
+ <form>
|
|
|
+ <view class="module-com">
|
|
|
+ <view class="commodity-view">
|
|
|
+ <view class="commodity-list">
|
|
|
+ <view class="commodity-item">
|
|
|
+ <image
|
|
|
+ class="item-icon"
|
|
|
+ src="https://img.huaml.com/uploads/12358/202005/29/de74c55596d304b85e79154958e8bf57_small.jpeg"
|
|
|
+ alt="商品图"
|
|
|
+ />
|
|
|
+
|
|
|
+ <view class="item-info">
|
|
|
+ <view class="info-line">
|
|
|
+ <text class="item-name">天使面孔</text>
|
|
|
+ <text class="item-price">
|
|
|
+ <text class="unit">¥</text>
|
|
|
+
|
|
|
+ <text class="price">60.00</text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-line">
|
|
|
+ <text class="item-type">c级</text>
|
|
|
+ <text class="item-count">25/4</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="summary-bar">
|
|
|
+ <view class="operate-view">
|
|
|
+ <text class="iconfont icongouwuche"></text>
|
|
|
+ 重选花材
|
|
|
+ </view>
|
|
|
+ <view class="describe-view">
|
|
|
+ 共3种, 共16扎9支,合计 ¥<text class="price">114.00</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="prompt-text">注: 请先关注公众号,绑定后可以在移动端自动登录</view> -->
|
|
|
+
|
|
|
+ <view class="module-com input-line-wrap">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
+ <view class="tui-title ">供应商</view>
|
|
|
+ <text>
|
|
|
+ 茗星花卉 欠款:91658.00
|
|
|
+ </text>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title "></view>
|
|
|
+
|
|
|
+ <view class="tag-list">
|
|
|
+ <view class="tag-item">
|
|
|
+ 盛丰
|
|
|
+ </view>
|
|
|
+ <view class="tag-item">
|
|
|
+ 盛丰
|
|
|
+ </view>
|
|
|
+ <view class="tag-item">
|
|
|
+ 盛丰
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </tui-list-cell>
|
|
|
+ </view>
|
|
|
+ <view class="module-com input-line-wrap">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">打包费</view>
|
|
|
+ <input
|
|
|
+ v-model="form.floor"
|
|
|
+ placeholder-class="phcolor"
|
|
|
+ class="tui-input"
|
|
|
+ name="floor"
|
|
|
+ placeholder="请填写,留空没有费用"
|
|
|
+ />
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">包机(长途运费)</view>
|
|
|
+ <input
|
|
|
+ v-model="form.floor"
|
|
|
+ placeholder-class="phcolor"
|
|
|
+ class="tui-input"
|
|
|
+ name="floor"
|
|
|
+ placeholder="请填写,留空没有费用"
|
|
|
+ />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">提货费</view>
|
|
|
+ <input
|
|
|
+ v-model="form.floor"
|
|
|
+ placeholder-class="phcolor"
|
|
|
+ class="tui-input"
|
|
|
+ name="floor"
|
|
|
+ placeholder="请填写,留空没有费用"
|
|
|
+ />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title ">本地运费</view>
|
|
|
+ <input
|
|
|
+ v-model="form.floor"
|
|
|
+ placeholder-class="phcolor"
|
|
|
+ class="tui-input"
|
|
|
+ name="floor"
|
|
|
+ placeholder="请填写,留空没有费用"
|
|
|
+ />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ :arrow="true"
|
|
|
+ @click="openAddres"
|
|
|
+ >
|
|
|
+ <view class="tui-title ">入库日期</view>
|
|
|
+ <view class="tui-input" v-if="form.province || form.city">
|
|
|
+ {{ form.province + "-" + form.city }}
|
|
|
+ </view>
|
|
|
+ <view class="tui-placeholder" v-else>请选择</view>
|
|
|
+ <input v-model="form.province" name="province" hidden />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell
|
|
|
+ class="line-cell"
|
|
|
+ :hover="false"
|
|
|
+ :arrow="true"
|
|
|
+ @click="openAddres"
|
|
|
+ >
|
|
|
+ <view class="tui-title ">仓库</view>
|
|
|
+ <view class="tui-input" v-if="form.province || form.city">
|
|
|
+ {{ form.province + "-" + form.city }}
|
|
|
+ </view>
|
|
|
+ <view class="tui-placeholder" v-else>请选择仓库</view>
|
|
|
+ <input v-model="form.province" name="province" hidden />
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+ <!-- <tui-list-cell class="line-cell remark-wrap" :hover="false">
|
|
|
+ <view class="tui-title">简介</view>
|
|
|
+ <view class="tui-input">
|
|
|
+ <textarea
|
|
|
+ v-model="form.introduction"
|
|
|
+ class="tui-textarea remark"
|
|
|
+ placeholder-class="phcolor"
|
|
|
+ placeholder="请输入简介"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </tui-list-cell> -->
|
|
|
+ </view>
|
|
|
+ </form>
|
|
|
+ </view>
|
|
|
+ <view class="under-bar">
|
|
|
+ <view class="price-view">
|
|
|
+ <text class="price-title">总金额</text>
|
|
|
+ <text class="price-number">¥ <text class="large">114</text>.00</text>
|
|
|
+ </view>
|
|
|
+ <button class="admin-button-com blue middle" @click="formSubmit">
|
|
|
+ 确认
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+ <!-- 选择地区 -->
|
|
|
+ <app-area-sel
|
|
|
+ :show.sync="showRegion"
|
|
|
+ @change="changeAreaFn"
|
|
|
+ :city="form.city"
|
|
|
+ />
|
|
|
+ <!-- 省市联动 -->
|
|
|
+ <simple-address
|
|
|
+ ref="simpleAddress"
|
|
|
+ :pickerValueDefault="cityPickerValueDefault"
|
|
|
+ @onConfirm="onCityConfirm"
|
|
|
+ ></simple-address>
|
|
|
+ <!-- 选择客户 -->
|
|
|
+ <AppCustomerSel
|
|
|
+ :show.sync="showCustomer"
|
|
|
+ @change="changeCustomerFn"
|
|
|
+ :city="form.customer"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TuiListCell from "@/components/plugin/list-cell";
|
|
|
+import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
+import SimpleAddress from "@/components/plugin/simple-address";
|
|
|
+import AppAreaSel from "@/components/app-area-sel";
|
|
|
+import AppCustomerSel from "@/components/app-customer-sel";
|
|
|
+const form = require("@/utils/formValidation.js");
|
|
|
+export default {
|
|
|
+ // 采购详情
|
|
|
+ components: {
|
|
|
+ TuiListCell,
|
|
|
+ AppAvatarModule,
|
|
|
+ SimpleAddress,
|
|
|
+ AppAreaSel,
|
|
|
+ AppCustomerSel
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form: {
|
|
|
+ shopName: "",
|
|
|
+ province: "",
|
|
|
+ city: "",
|
|
|
+ address: "",
|
|
|
+ floor: "",
|
|
|
+ openTime: "8:00 - 22:00",
|
|
|
+ introduction: "",
|
|
|
+ telephone: "",
|
|
|
+ customer: ""
|
|
|
+ },
|
|
|
+ // 详细地址
|
|
|
+ showRegion: false,
|
|
|
+ showCustomer: true,
|
|
|
+ region: {
|
|
|
+ lat: 0,
|
|
|
+ long: 0
|
|
|
+ },
|
|
|
+ // 省市联动
|
|
|
+ regionData: [],
|
|
|
+ cityPickerValueDefault: [0, 0]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this._getDet();
|
|
|
+ },
|
|
|
+ // api
|
|
|
+ _getDet() {
|
|
|
+ let data = uni.getStorageSync("modifyShopB");
|
|
|
+ if (this.$util.isEmpty(data)) return;
|
|
|
+ Object.keys(this.form).forEach((i, index) => {
|
|
|
+ // if (i != 'password') {
|
|
|
+ this.form[i] = data[i];
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // option
|
|
|
+ // 选择地址
|
|
|
+ selRegionFn() {
|
|
|
+ if (!this.form.city) {
|
|
|
+ this.$msg("请先选择城市!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.showRegion = true;
|
|
|
+ },
|
|
|
+ changeAreaFn(e) {
|
|
|
+ console.log("changeAreaFn", e);
|
|
|
+ this.form.address = e.address;
|
|
|
+ this.region.lat = e.location.lat;
|
|
|
+ this.region.long = e.location.lng;
|
|
|
+ },
|
|
|
+ changeCustomerFn(e) {
|
|
|
+ console.log("changeCustomerFn", e);
|
|
|
+ this.form.address = e.address;
|
|
|
+ this.form.lat = e.location.lat;
|
|
|
+ this.form.long = e.location.lng;
|
|
|
+ },
|
|
|
+ // 省市联动
|
|
|
+ openAddres() {
|
|
|
+ this.$refs.simpleAddress.open();
|
|
|
+ },
|
|
|
+ onCityConfirm(e) {
|
|
|
+ // this.form.receiveAddress = e.label
|
|
|
+ this.form.province = e.provinceName;
|
|
|
+ this.form.city = e.cityName;
|
|
|
+ // this.pickerText = JSON.stringify(e)
|
|
|
+ },
|
|
|
+ confirmFn() {
|
|
|
+ let hostFn = this.option.id ? update : add;
|
|
|
+ if (this.option.id) {
|
|
|
+ this.form.id = this.option.id;
|
|
|
+ }
|
|
|
+ hostFn(this.form).then(res => {
|
|
|
+ let promptText = this.option.id ? "修改成功!" : "添加成功!";
|
|
|
+ this.$msg(promptText);
|
|
|
+ // uni.removeStorageSync("modifyShopB");
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.$util.pageTo("/admin/shop/list");
|
|
|
+ // }, 1000);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 表单验证
|
|
|
+ formSubmit(e) {
|
|
|
+ // 表单规则
|
|
|
+ let rules = [
|
|
|
+ {
|
|
|
+ name: "shopName",
|
|
|
+ rule: [""],
|
|
|
+ msg: ["请输入名称"]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "openTime",
|
|
|
+ rule: [""],
|
|
|
+ msg: ["请输入营业时间"]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "telephone",
|
|
|
+ rule: [""],
|
|
|
+ msg: ["请输入联系电话"]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "province",
|
|
|
+ rule: [""],
|
|
|
+ msg: ["请选择地址"]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "address",
|
|
|
+ rule: [""],
|
|
|
+ msg: ["请填写详细地址"]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "floor",
|
|
|
+ rule: [""],
|
|
|
+ msg: ["请输入门牌号"]
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ // 进行表单检查
|
|
|
+ let formData = this.form;
|
|
|
+ let checkRes = form.validation(formData, rules);
|
|
|
+ // 验证通过!
|
|
|
+ if (!checkRes) {
|
|
|
+ this.confirmFn();
|
|
|
+ } else {
|
|
|
+ this.$msg(checkRes);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.affirm-page {
|
|
|
+ position: relative;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ .affirm-view {
|
|
|
+ flex: 1;
|
|
|
+ padding: 20upx;
|
|
|
+ background-color: #f0f2f6;
|
|
|
+
|
|
|
+ .tag-list {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ // justify-content: flex-end;
|
|
|
+ align-items: center;
|
|
|
+ .tag-item {
|
|
|
+ padding: 0 28upx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin: 0 10upx 10upx 0;
|
|
|
+ height: 50upx;
|
|
|
+ font-size: 26upx;
|
|
|
+
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+ border-radius: 4upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .commodity-view {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .commodity-list {
|
|
|
+ padding: 20upx;
|
|
|
+ .commodity-item {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ .item-icon {
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 140upx;
|
|
|
+ height: 140upx;
|
|
|
+ }
|
|
|
+ .item-info {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 20upx;
|
|
|
+ .info-line {
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: flex-end;
|
|
|
+ .item-name {
|
|
|
+ color: #666;
|
|
|
+ font-size: 28upx;
|
|
|
+ }
|
|
|
+ .item-price {
|
|
|
+ color: #333;
|
|
|
+ font-size: 22upx;
|
|
|
+ .price {
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .item-type {
|
|
|
+ color: #999;
|
|
|
+ font-size: 24upx;
|
|
|
+ }
|
|
|
+ .item-count {
|
|
|
+ color: #666;
|
|
|
+ font-size: 24upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .summary-bar {
|
|
|
+ padding: 0 20upx;
|
|
|
+ height: 90upx;
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ border-top: 1upx solid #eeeeee;
|
|
|
+ .operate-view {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ align-items: center;
|
|
|
+ color: #3385ff;
|
|
|
+ font-size: 26upx;
|
|
|
+ .iconfont {
|
|
|
+ margin-right: 20upx;
|
|
|
+ font-size: 40upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .describe-view {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ align-items: center;
|
|
|
+ color: #333;
|
|
|
+ font-size: 24upx;
|
|
|
+ .price {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 36upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .module-com {
|
|
|
+ background-color: #fff;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+
|
|
|
+ border-radius: 10upx;
|
|
|
+ overflow: hidden;
|
|
|
+ .member-wrap {
|
|
|
+ .member-det {
|
|
|
+ font-size: 24upx;
|
|
|
+ margin-left: 20upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .remark-wrap {
|
|
|
+ align-items: flex-start;
|
|
|
+ .remark {
|
|
|
+ height: 240upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // .tui-placeholder,
|
|
|
+ // .tui-input {
|
|
|
+ // padding-right: 30upx;
|
|
|
+ // width: 100%;
|
|
|
+ // text-align: right;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .under-bar {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 20upx;
|
|
|
+ width: 100%;
|
|
|
+ height: 100upx;
|
|
|
+ background-color: #fff;
|
|
|
+
|
|
|
+ box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
|
|
|
+ .price-view {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 24upx;
|
|
|
+ .price-title {
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ .price-number {
|
|
|
+ margin: 0 20upx;
|
|
|
+ color: #ff2842;
|
|
|
+ .large {
|
|
|
+ font-size: 40upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .admin-button-com {
|
|
|
+ width: 200upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|