Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq
This commit is contained in:
commit
a9691e5891
|
|
@ -461,3 +461,14 @@ export function $returnTableDetail(data) {
|
|||
}
|
||||
});
|
||||
}
|
||||
//获取订单可用优惠券
|
||||
export function $activateByOrderId(data) {
|
||||
return request({
|
||||
url: '/api/tbShopCoupon/activateByOrderId',
|
||||
method: "get",
|
||||
params:{
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<!-- 优惠券 -->
|
||||
<div v-if="form.type == 1" class="content">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
|
||||
<el-form-item label="优惠卷卷名" prop="title">
|
||||
<el-form-item label="优惠券券名" prop="title">
|
||||
<el-input v-model="form.title" placeholder="" style="width: 289px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用门槛">
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
<!-- 商品券 -->
|
||||
<div v-if="form.type == 2" class="content">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="left">
|
||||
<el-form-item label="商品卷卷名" prop="title">
|
||||
<el-form-item label="商品券券名" prop="title">
|
||||
<el-input v-model="form.title" placeholder="" style="width: 289px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发放数量" prop="number">
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@
|
|||
<el-form-item label="分类打印">
|
||||
<el-radio-group v-model="forms.classifyPrint">
|
||||
<el-radio label="0">打印所有</el-radio>
|
||||
<el-radio label="1">部分分类</el-radio>
|
||||
<el-radio label="1">部分分类(仅打印制作单[厨房])</el-radio>
|
||||
<!-- <el-radio label="2">部分商品</el-radio> -->
|
||||
</el-radio-group>
|
||||
<div v-if="forms.classifyPrint == 1" style="color: rgb(255, 77, 79);margin-left: 80px;">仅打印制作单[厨房]</div>
|
||||
<!-- <div v-if="forms.classifyPrint == 1" style="color: rgb(255, 77, 79);margin-left: 80px;"></div> -->
|
||||
<div v-if="forms.classifyPrint == 1" style="margin-left:70px">
|
||||
<!-- <el-tree :data="partList" show-checkbox node-key="id" ref="tree" :default-checked-keys="this.forms.categoryIds"
|
||||
:props="{ children: 'childrenList', label: 'name' }">
|
||||
|
|
|
|||
|
|
@ -6,20 +6,19 @@
|
|||
</el-tabs> -->
|
||||
<div class="head-container">
|
||||
<el-form :model="query" inline label-position="left">
|
||||
<el-radio-group v-model="timeValue" @change="timeChange">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="0">今天</el-radio-button>
|
||||
<el-radio-button label="-1">昨天</el-radio-button>
|
||||
<el-radio-button label="-7">最近7天</el-radio-button>
|
||||
<el-radio-button label="-30">最近30天</el-radio-button>
|
||||
<el-radio-button label="week">本周</el-radio-button>
|
||||
<el-radio-button label="month">本月</el-radio-button>
|
||||
<el-radio-button label="custom">自定义</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-radio-group v-model="timeValue" @change="timeChange">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="0">今天</el-radio-button>
|
||||
<el-radio-button label="-1">昨天</el-radio-button>
|
||||
<el-radio-button label="-7">最近7天</el-radio-button>
|
||||
<el-radio-button label="-30">最近30天</el-radio-button>
|
||||
<el-radio-button label="week">本周</el-radio-button>
|
||||
<el-radio-button label="month">本月</el-radio-button>
|
||||
<el-radio-button label="custom">自定义</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
|
|
@ -39,19 +38,17 @@
|
|||
<div class="info">
|
||||
<div class="m">
|
||||
<template v-if="item.isAmount == 1">¥</template>
|
||||
{{ item.payAmount }}
|
||||
</div>
|
||||
<div class="t">{{ item.payType }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
{{ item.payAmount }}
|
||||
</div>
|
||||
<div class="t">{{ item.payType }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="head-container">
|
||||
<el-table :data="tableData.data" v-loading="tableData.loading" v-if="orderType == 1">
|
||||
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="50">
|
||||
|
||||
<el-table-column type="index" width="50">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="序号" prop="id"></el-table-column> -->
|
||||
<!-- <el-table-column label="区域id" prop="areaId"></el-table-column> -->
|
||||
|
|
@ -67,7 +64,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单金额" prop="orderAmount"></el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<!-- <el-table :data="tableData.data" v-loading="tableData.loading" v-if="orderType == 2">
|
||||
<el-table-column label="商品名称" prop="productName"></el-table-column>
|
||||
|
|
@ -96,7 +93,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { summaryTable,summaryTableDownload } from '@/api/table'
|
||||
import { summaryTable, summaryTableDownload } from '@/api/table'
|
||||
import dayjs from "dayjs";
|
||||
import { downloadFile } from "@/utils/index";
|
||||
|
||||
|
|
@ -135,14 +132,15 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
//携带table id跳转到订单列表页面
|
||||
toTableOrderList(data){
|
||||
console.log(data)
|
||||
toTableOrderList(data) {
|
||||
// console.log(data)
|
||||
this.$router.push({
|
||||
path:'/order_manage/order_list',
|
||||
query:{
|
||||
tableName: data.tableName
|
||||
path: '/order_manage/order_list',
|
||||
query: {
|
||||
tableName: data.tableName,
|
||||
timeValue: this.timeValue
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 导出Excel
|
||||
async downloadHandle() {
|
||||
|
|
@ -180,10 +178,10 @@ export default {
|
|||
this.tableData.loading = true;
|
||||
try {
|
||||
const res = await summaryTable({
|
||||
page: this.tableData.page+1,
|
||||
size: this.tableData.size,
|
||||
startTime:this.query.createdAt[0],
|
||||
endTime:this.query.createdAt[1]
|
||||
page: this.tableData.page + 1,
|
||||
size: this.tableData.size,
|
||||
startTime: this.query.createdAt[0],
|
||||
endTime: this.query.createdAt[1]
|
||||
});
|
||||
this.tableData.loading = false;
|
||||
this.tableData.data = res;
|
||||
|
|
@ -271,12 +269,13 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cursor-pointer{
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
color: #1890ff;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.cursor-pointer:hover{
|
||||
|
||||
.cursor-pointer:hover {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -457,9 +457,9 @@
|
|||
placeholder="请输入耗材信息代码"
|
||||
></el-input>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="耗材价格">
|
||||
<el-form-item label="耗材价格">
|
||||
<el-input v-model="ruleForm.price" placeholder="请输入耗材价格"></el-input>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="conUnit">
|
||||
<el-input v-model="ruleForm.conUnit" placeholder="请输入单位"></el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -482,13 +482,15 @@
|
|||
</template>
|
||||
</el-dialog>
|
||||
<!-- 单位修改 -->
|
||||
<el-dialog :title="unitItem ? unitItem.conName : ''" :visible.sync="dialogtitleunit" width="40%">
|
||||
<el-dialog :title="unitItem ? unitItem.conName : ''" @open="closeande" :visible.sync="dialogtitleunit" width="40%">
|
||||
<template>
|
||||
<div class="unitStyle unitWidth">
|
||||
<div>主单位</div>
|
||||
<div>{{ unitItem ? unitItem.conUnit : '' }}</div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div style="width: 9px;height: 9px;background-color: #D9D9D9;border-radius: 50%;margin:0 6px;"></div> 订货单位
|
||||
<div style="display: flex;align-items: center;" @click="switchzhufu = 1">
|
||||
<div style="width: 9px;height: 9px;border-radius: 50%;margin:0 6px;"
|
||||
:style="{ background: switchzhufu == 1 ? 'green' : '#D9D9D9' }"></div>
|
||||
<div>订货单位</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="unitStyleBottom unitWidth" @click="switchs = 1" v-if="switchs == 2">
|
||||
|
|
@ -496,13 +498,18 @@
|
|||
</div>
|
||||
<div class="unitStyle unitWidth " style="margin-top: 20px;" v-else>
|
||||
<div>副单位</div>
|
||||
<div><input style="width: 70px;" type="text" v-model="unitItem.conUnitTwo"> </div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<div style="width: 9px;height: 9px;background-color: #D9D9D9;border-radius: 50%;margin:0 6px;"></div> 订货单位
|
||||
<div><input style="width: 70px;height: 28px;;border: 1px solid #dddfe6;" type="text"
|
||||
v-model="unitItem.conUnitTwo" @input="conUnitTwoinput">
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;justify-content: space-between;">
|
||||
<div style="width: 9px;height: 9px;border-radius: 50%;margin:0 6px;"
|
||||
:style="{ background: switchzhufu == 2 ? 'green' : '#D9D9D9' }" @click="switchzhufu = 2"></div>
|
||||
<div @click="switchzhufu = 2">订货单位</div>
|
||||
<input type="text" disabled placeholder="1">
|
||||
<div style="width: 80px;">{{ unitItem.conUnitTwo }}</div>= <input style="width: 80px;" v-model="unitItem.conUnitTwoConvert"
|
||||
type="number">{{
|
||||
unitItem.conUnit }}
|
||||
<div>{{ unitItem.conUnitTwo }}=</div>
|
||||
<input v-model="unitItem.conUnitTwoConvert" style="width: 80px;" type="number">
|
||||
{{ unitItem.conUnit }}
|
||||
<span style="color: red;margin-left: 8px;cursor: pointer;" @click="deleteEvent">删除</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: center;margin-top: 20px;">
|
||||
|
|
@ -632,11 +639,13 @@ import { hasPermission } from '@/utils/limits.js'
|
|||
|
||||
export default {
|
||||
components: { AddConsTakin, UploadExcel, consRecordDetail },
|
||||
name:'information',
|
||||
name: 'information',
|
||||
data() {
|
||||
return {
|
||||
tongji: {},//统计
|
||||
dayjs,
|
||||
// 切换主副单位
|
||||
switchzhufu: "1",
|
||||
query: {
|
||||
conTypeId: "",
|
||||
conTypeName: "",
|
||||
|
|
@ -710,7 +719,7 @@ export default {
|
|||
},
|
||||
ruleFormLoading: false,
|
||||
dialogtitleunit: false,
|
||||
unitItem: { switchs: 2 },
|
||||
unitItem: {},
|
||||
switchs: 2,
|
||||
ruleForms: [],
|
||||
ruleForm: {
|
||||
|
|
@ -764,6 +773,11 @@ export default {
|
|||
this.getTableDatatype();
|
||||
},
|
||||
methods: {
|
||||
deleteEvent() {
|
||||
this.switchs = 2
|
||||
this.unitItem.conUnitTwo = ''
|
||||
this.unitItem.conUnitTwoConvert = ''
|
||||
},
|
||||
async routerGo(name) {
|
||||
let text;
|
||||
if (name == 'operation_in') { text = "允许耗材入库" }
|
||||
|
|
@ -771,6 +785,9 @@ export default {
|
|||
let res = await hasPermission(text);
|
||||
if (!res) { return; }
|
||||
this.$router.push({ name: name })
|
||||
},
|
||||
closeande() {
|
||||
|
||||
},
|
||||
lookDetail(row) {
|
||||
this.$refs.recodeDetail.open({
|
||||
|
|
@ -805,13 +822,20 @@ export default {
|
|||
})
|
||||
},
|
||||
async submitUnit() {
|
||||
|
||||
console.log(this.switchzhufu, '体哦啊是1')
|
||||
|
||||
const res = await unittbConsInfo([{
|
||||
defaultUnit: this.switchzhufu == 1 ? this.unitItem.conUnit : this.unitItem.conUnitTwo,
|
||||
conUnitTwoConvert: this.unitItem.conUnitTwoConvert * 1,
|
||||
conUnitTwo: this.unitItem.conUnitTwo,
|
||||
id: this.unitItem.id
|
||||
}])
|
||||
this.unitItem = {}
|
||||
this.dialogtitleunit = false
|
||||
this.resetRuleForms()
|
||||
this.getTableData();
|
||||
this.getTableDatatype();
|
||||
},
|
||||
//跳转订单列表
|
||||
toGoodslist(orderNo) {
|
||||
|
|
@ -866,6 +890,10 @@ export default {
|
|||
return 'red'
|
||||
}
|
||||
},
|
||||
conUnitTwoinput(d) {
|
||||
// console.log(d.target.value,'调试1')
|
||||
this.unitItem.conUnitTwo = d.target.value
|
||||
},
|
||||
// 状态切换
|
||||
async showChange(e, row) {
|
||||
await postapitbConsInfo([{
|
||||
|
|
@ -889,11 +917,19 @@ export default {
|
|||
},
|
||||
// 单位编辑
|
||||
editorHandles(row) {
|
||||
this.unitItem = row;
|
||||
this.switchs = 2
|
||||
if (row.conUnitTwo) {
|
||||
this.switchs = 1
|
||||
}
|
||||
// this.unitItem = row;
|
||||
this.unitItem.conUnitTwoConvert = row.conUnitTwoConvert
|
||||
this.unitItem.id = row.id
|
||||
this.unitItem.conUnit = row.conUnit
|
||||
this.unitItem.conName = row.conName
|
||||
this.unitItem.conUnitTwo = row.conUnitTwo
|
||||
if (row.conUnitTwo) this.switchs = 1
|
||||
else this.switchs = 2
|
||||
|
||||
// this.switchs = 2
|
||||
// if (row. ) {
|
||||
// this.switchs = 1
|
||||
// }
|
||||
this.dialogtitleunit = true;
|
||||
},
|
||||
|
||||
|
|
@ -1396,7 +1432,7 @@ export default {
|
|||
color: #999999;
|
||||
|
||||
>input {
|
||||
width: 39px;
|
||||
width: 75px;
|
||||
height: 28px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 2px 2px 2px 2px;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<el-option :label="item.purveyorName" :value="item.id" v-for="item in purveyorList"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
{{ queryForm.waitAmount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -84,10 +85,6 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="欠款金额">
|
||||
<el-input v-model="queryForm.waitAmount" disabled style="width: 220px;"></el-input>
|
||||
</el-form-item>
|
||||
</el-col> <el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="queryForm.remark" placeholder="请输入备注" style="width: 220px;"></el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -123,13 +120,27 @@
|
|||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.price" :min="0" controls-position="right"
|
||||
@change="consCountTotal($event, scope.row, 'price')"></el-input-number>
|
||||
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
||||
<div class="tips" style="font-size: 16px;">原价¥
|
||||
<!-- {{ scope.row.costPrice }}/{{ scope.row.conUnit }} -->
|
||||
|
||||
{{ !scope.row.unit ?
|
||||
(scope.row.defaultUnit ?
|
||||
scope.row.defaultUnit== scope.row.conUnitTwo?
|
||||
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice:scope.row.costPrice)
|
||||
: scope.row.unit== scope.row.conUnitTwo?
|
||||
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice}}
|
||||
/
|
||||
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
||||
scope.row.conUnit) : scope.row.unit }}
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位">
|
||||
<template v-slot="scope">
|
||||
<el-select @change="consCountTotal($event, scope.row, 'unit')" v-model="scope.row.unit"
|
||||
:placeholder="scope.row.conUnit">
|
||||
:placeholder="scope.row.defaultUnit ? scope.row.defaultUnit : scope.row.conUnit">
|
||||
<el-option :label="scope.row.conUnit" :value="scope.row.conUnit"> </el-option>
|
||||
<el-option :label="scope.row.conUnitTwo" :value="scope.row.conUnitTwo"
|
||||
v-if="scope.row.conUnitTwo"> </el-option>
|
||||
|
|
@ -142,7 +153,16 @@
|
|||
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
||||
controls-position="right"
|
||||
@change="consCountTotal($event, scope.row, 'stockNumber')"></el-input-number>
|
||||
<div class="tips">入库前:{{ scope.row.number }}{{ scope.row.conUnit }}
|
||||
<div class="tips" style="font-size: 16px;">入库前:
|
||||
{{ !scope.row.unit ?
|
||||
(scope.row.defaultUnit ?
|
||||
scope.row.defaultUnit== scope.row.conUnitTwo?
|
||||
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number:scope.row.number)
|
||||
: scope.row.unit== scope.row.conUnitTwo?
|
||||
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number}}
|
||||
|
||||
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
||||
scope.row.conUnit) : scope.row.unit }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -188,7 +208,8 @@
|
|||
<el-input-number v-model="scope.row.number" :min="0" :step="1" step-strictly
|
||||
controls-position="right"
|
||||
@change="modifyPrice($event, scope.row, 'number', 'totalAmount')"></el-input-number>
|
||||
<div class="tips">入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
<div class="tips" style="font-size: 16px;">入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName
|
||||
}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小计">
|
||||
|
|
@ -240,7 +261,7 @@ import { tbConsInfoGet, tbProductlist } from "@/api/invoicing";
|
|||
import { tbShopPurveyorGet, tbProductStockOperateOutAndOn, stockInOut } from '@/api/invoicing'
|
||||
import { formatDecimal } from '@/utils'
|
||||
export default {
|
||||
name:'operation_in',
|
||||
name: 'operation_in',
|
||||
components: {
|
||||
shopList,
|
||||
ConsumableList
|
||||
|
|
@ -380,7 +401,11 @@ export default {
|
|||
})
|
||||
} else {
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
let p = 1
|
||||
if (ele.unit && ele.conUnitTwo == ele.unit) {
|
||||
p = ele.conUnitTwoConvert
|
||||
}
|
||||
zong += ele.price * ele.stockNumber * p
|
||||
})
|
||||
}
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
|
|
@ -404,7 +429,6 @@ export default {
|
|||
},
|
||||
// 切换入库内容
|
||||
tabChange(value, type) {
|
||||
console.log(value, type)
|
||||
this.shopTypesActive = type == 'in' ? 0 : 1
|
||||
this.inTabValue = value
|
||||
this.resetHandle()
|
||||
|
|
@ -413,7 +437,7 @@ export default {
|
|||
},
|
||||
// 切换类型
|
||||
changeTypeEnum(index) {
|
||||
let filterd= this.purveyorList.filter(ele=>ele.id == index)
|
||||
let filterd = this.purveyorList.filter(ele => ele.id == index)
|
||||
this.queryForm.waitAmount = filterd[0].waitAmount
|
||||
|
||||
this.inTabs.forEach((i) => {
|
||||
|
|
@ -445,7 +469,6 @@ export default {
|
|||
}, 10)
|
||||
} else {
|
||||
row[key1] = cvalue
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
let p = 1
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<el-option :label="item.purveyorName" :value="item.id" v-for="item in purveyorList"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
{{ queryForm.waitAmount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -83,11 +84,6 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="欠款金额">
|
||||
<el-input v-model="queryForm.waitAmount" disabled style="width: 220px;"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="queryForm.remark" placeholder="请输入备注" style="width: 220px;"></el-input>
|
||||
|
|
@ -122,18 +118,32 @@
|
|||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.price" :min="0" controls-position="right"
|
||||
@change="consCountTotal($event, scope.row, 'price')"></el-input-number>
|
||||
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
||||
<div class="tips" style="font-size: 16px;">原价¥
|
||||
<!-- {{ scope.row.costPrice }}/{{ scope.row.conUnit }} -->
|
||||
{{ !scope.row.unit ?
|
||||
(scope.row.defaultUnit ?
|
||||
scope.row.defaultUnit== scope.row.conUnitTwo?
|
||||
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice:scope.row.costPrice)
|
||||
: scope.row.unit== scope.row.conUnitTwo?
|
||||
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice}}
|
||||
/
|
||||
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
||||
scope.row.conUnit) : scope.row.unit }}
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位">
|
||||
<template v-slot="scope">
|
||||
<el-select @change="consCountTotal($event, scope.row, 'unit')" v-model="scope.row.unit"
|
||||
:placeholder="scope.row.conUnit">
|
||||
:placeholder="scope.row.defaultUnit ? scope.row.defaultUnit : scope.row.conUnit">
|
||||
<el-option :label="scope.row.conUnit" :value="scope.row.conUnit"> </el-option>
|
||||
<el-option :label="scope.row.conUnitTwo" :value="scope.row.conUnitTwo"
|
||||
v-if="scope.row.conUnitTwo"> </el-option>
|
||||
</el-select>
|
||||
<div class="tips"> </div>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
|
|
@ -141,7 +151,21 @@
|
|||
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
||||
controls-position="right"
|
||||
@change="consCountTotal($event, scope.row, 'stockNumber')"></el-input-number>
|
||||
<div class="tips">出库前:{{ scope.row.number }}{{ scope.row.conUnit }}</div>
|
||||
<!-- <div class="tips" style="font-size: 16px;">出库前:{{ scope.row.number }}{{ scope.row.conUnit }}</div> -->
|
||||
|
||||
<div class="tips" style="font-size: 16px;">出库前:
|
||||
{{ !scope.row.unit ?
|
||||
(scope.row.defaultUnit ?
|
||||
scope.row.defaultUnit== scope.row.conUnitTwo?
|
||||
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number:scope.row.number)
|
||||
: scope.row.unit== scope.row.conUnitTwo?
|
||||
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number}}
|
||||
|
||||
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
||||
scope.row.conUnit) : scope.row.unit }}
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小计">
|
||||
|
|
@ -184,7 +208,7 @@
|
|||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||
@change="modifyPrice($event, scope.row, 'number', 'totalAmount')"></el-input-number>
|
||||
<div class="tips">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
<div class="tips" style="font-size: 16px;">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小计">
|
||||
|
|
@ -385,7 +409,11 @@ export default {
|
|||
})
|
||||
} else {
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
let p = 1
|
||||
if (ele.unit && ele.conUnitTwo == ele.unit) {
|
||||
p = ele.conUnitTwoConvert
|
||||
}
|
||||
zong += ele.price * ele.stockNumber * p
|
||||
})
|
||||
}
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
|
|
|
|||
|
|
@ -234,6 +234,10 @@ export default {
|
|||
if (this.$route.query.tableName) {
|
||||
this.query.tableName = this.$route.query.tableName
|
||||
}
|
||||
if (this.$route.query.timeValue) {
|
||||
this.timeValue = this.$route.query.timeValue
|
||||
this.timeChange(this.timeValue);
|
||||
}
|
||||
if (this.$route.query.orderNo) {
|
||||
this.query.orderNo = this.$route.query.orderNo
|
||||
}
|
||||
|
|
|
|||
|
|
@ -825,7 +825,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="forms">
|
||||
<div class="forms">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="createOrder.form"
|
||||
|
|
@ -843,7 +843,7 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn_group">
|
||||
<el-button size="medium" @click="disCountShow">
|
||||
|
|
@ -1287,6 +1287,7 @@ import {
|
|||
tbShopTableGet,
|
||||
$changeUseType,
|
||||
$returnTableDetail,
|
||||
$activateByOrderId
|
||||
} from "@/api/table";
|
||||
import { tbShopCategoryGet } from "@/api/shop";
|
||||
import {
|
||||
|
|
@ -1745,6 +1746,7 @@ export default {
|
|||
tableId: this.table.tableId,
|
||||
masterId: this.masterId,
|
||||
vipUserId: val,
|
||||
orderId:this.createOrder.data.id||'',
|
||||
type: val === "" ? 1 : 0,
|
||||
});
|
||||
},
|
||||
|
|
@ -3407,9 +3409,17 @@ export default {
|
|||
this.table = params.tableId ? item : "";
|
||||
},
|
||||
async getOrderData(params) {
|
||||
const orderId= params ? params.orderId : this.createOrder.data.id
|
||||
|
||||
const res = await tbOrderInfoDetail(
|
||||
params ? params.orderId : this.createOrder.data.id
|
||||
);
|
||||
if(res.memberId){
|
||||
$activateByOrderId({
|
||||
orderId,memberId:res.memberId
|
||||
})
|
||||
}
|
||||
|
||||
if (res.status != "unpaid") {
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue