|
|
@@ -5,18 +5,20 @@
|
|
|
<slot name="operation"></slot>
|
|
|
<el-button style="margin:0 0 10px 10px" size="small" type="primary" :disabled="data.status !== '新建'" v-if="type !== 'confirmdate'" @click="drawer = true">{{setcol === 24?'添 加':'取 消'}}</el-button>
|
|
|
<excel style="margin:0 0 10px 10px" :tablecols="columnTitle" :param="param" :total="total" :excelTitle="excelTitle"></excel>
|
|
|
+ <el-input style="width:200px;margin:0 0 10px 10px" placeholder="根据商品/品号搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition"
|
|
|
+ @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
+ </el-input>
|
|
|
<el-tooltip class="item" effect="dark" content="输入整单折扣,订单行进行计算,回车保存" placement="top-start">
|
|
|
<el-input :disabled="data.status !== '新建' && data.status !== '预提交'" v-if="tool.checkAuth($route.name,'quickDiscountrate')" v-model.number="discountrate" size="small" style="width:200px;margin:0 0 10px 10px" type="number" :min="0" :max="1" placeholder="输入折扣" @change="discountrateValidate" @keydown.enter.native="quickDiscountrate"></el-input>
|
|
|
</el-tooltip>
|
|
|
<el-button style="margin:0 0 10px 10px" type="text" size="small" @click="reloadPrice" class="inline-16">重置价格</el-button>
|
|
|
- <el-input style="width:200px;" placeholder="根据商品/品号搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition"
|
|
|
- @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
- </el-input>
|
|
|
+ <el-button style="margin:0 0 10px 10px" type="text" size="small" @click="changeSort">未发降序</el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
v-loading="loading"
|
|
|
ref="multipleTable"
|
|
|
:data="tableData"
|
|
|
+ :row-class-name="tableClassNamed"
|
|
|
size="small"
|
|
|
max-height="500px"
|
|
|
stripe
|
|
|
@@ -232,6 +234,9 @@ export default {
|
|
|
"sa_orderid": 0, //订单ID
|
|
|
"pageNumber": 1,
|
|
|
"pageSize": 20,
|
|
|
+ "sort":[
|
|
|
+
|
|
|
+ ],
|
|
|
"where": {
|
|
|
"condition": ""
|
|
|
}
|
|
|
@@ -270,7 +275,6 @@ export default {
|
|
|
this.total = res.total
|
|
|
this.totalPage = Math.ceil(this.total /200)
|
|
|
this.currentPage = res.pageNumber
|
|
|
- this.queryBasicInfo()
|
|
|
if (this.selectNumber[this.param.content.pageNumber -1]){
|
|
|
this.$refs.multipleTable.toggleRowSelection(this.tableData[3])
|
|
|
}
|
|
|
@@ -406,7 +410,7 @@ export default {
|
|
|
})
|
|
|
if (res.code == 1) {
|
|
|
this.$emit('onSuccess')
|
|
|
- this.listData()
|
|
|
+ // this.listData()
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message:res.data + ':' + res.msg,
|
|
|
@@ -454,6 +458,10 @@ export default {
|
|
|
},
|
|
|
// 订单添加产品
|
|
|
async onConfirm (data,isupload) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '数据插入中...',
|
|
|
+ });
|
|
|
if (isupload) {
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20221109093602,
|
|
|
@@ -471,10 +479,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
})
|
|
|
+ loading.close();
|
|
|
}
|
|
|
this.listData()
|
|
|
this.$emit('onSuccess')
|
|
|
this.$refs.addpro.tableSelectData = []
|
|
|
+ this.$refs.addpro.listData()
|
|
|
},
|
|
|
async queryStock (val) {
|
|
|
const res = await this.$api.requested({
|
|
|
@@ -575,12 +585,22 @@ export default {
|
|
|
this.drawer = false
|
|
|
// this.$refs.addpro.params.content.where.condition = ''
|
|
|
// this.$refs.addpro.params.content.where.isonsale = ''
|
|
|
+ },
|
|
|
+ tableClassNamed ({row,rowIndex}) {
|
|
|
+ if (row.undeliqty > 0) {
|
|
|
+ return 'bg-red';
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeSort(){
|
|
|
+ this.param.content.sort = [{sortname: "默认", sorted: 1, sortid: 146, reversed: 0}]
|
|
|
+ this.listData()
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
mounted () {
|
|
|
this.listData()
|
|
|
- // this.queryStock()
|
|
|
+ this.queryBasicInfo()
|
|
|
this.columnTitle = []
|
|
|
this.$refs.multipleTable.$children.forEach(obj => {
|
|
|
|
|
|
@@ -598,4 +618,7 @@ export default {
|
|
|
body .el-table th.gutter{
|
|
|
display: table-cell!important;
|
|
|
}
|
|
|
+.bg-red{
|
|
|
+ color:red !important;
|
|
|
+}
|
|
|
</style>
|