|
@@ -138,9 +138,11 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="bottom-btn">
|
|
|
- <div v-if="">当前价格尚未通过审核,建议审核通过后进行打印</div>
|
|
|
- <el-button class="submit" @click="closeCount">关闭</el-button>
|
|
|
- <el-button class="submit" @click="print">打印</el-button>
|
|
|
+ <div v-if="baseInfoForm.status=='审核中'" class="left">当前价格尚未通过审核,建议审核通过后进行打印</div>
|
|
|
+ <div class="right">
|
|
|
+ <el-button class="submit" @click="closeCount">关闭</el-button>
|
|
|
+ <el-button class="submit" @click="print">打印</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
|
|
@@ -365,16 +367,19 @@
|
|
|
}
|
|
|
},
|
|
|
// 设置表格颜色
|
|
|
- tableRowClassName({
|
|
|
- row,
|
|
|
- rowIndex
|
|
|
- }) {
|
|
|
- if (rowIndex === 1) {
|
|
|
- return 'warning-row';
|
|
|
- } else if (rowIndex === 3) {
|
|
|
- return 'success-row';
|
|
|
- }
|
|
|
- return '';
|
|
|
+tableRowClassName ({ row, rowIndex }) {
|
|
|
+ if ((rowIndex + 1) % 2 === 0) {
|
|
|
+ return 'double';
|
|
|
+ } else {
|
|
|
+ return 'single';
|
|
|
+ }
|
|
|
+ }, getRowClass ({ rowIndex }) {
|
|
|
+ if (rowIndex == 0) {
|
|
|
+ return 'background:#ebeaef'
|
|
|
+ } else {
|
|
|
+ return ''
|
|
|
+}
|
|
|
+ // return '';
|
|
|
},
|
|
|
// 增加分界
|
|
|
add(item, item1, index) {
|
|
@@ -676,31 +681,35 @@
|
|
|
// 提交
|
|
|
submit() {
|
|
|
debugger
|
|
|
- let isValidate = this.validate()
|
|
|
- if (isValidate) {
|
|
|
- this.makeTableList()
|
|
|
- this.makePriceDataList()
|
|
|
- this.baseInfoForm.goodsName = this.selectVal
|
|
|
- switch (this.$route.query.type) {
|
|
|
- case "查看":
|
|
|
- this.isCountShow = false;
|
|
|
- break;
|
|
|
- case "新增":
|
|
|
+
|
|
|
+ this.makeTableList()
|
|
|
+ this.makePriceDataList()
|
|
|
+ this.baseInfoForm.goodsName = this.selectVal
|
|
|
+ let isValidate = false
|
|
|
+ switch (this.$route.query.type) {
|
|
|
+ case "查看":
|
|
|
+ this.isCountShow = false;
|
|
|
+ break;
|
|
|
+ case "新增":
|
|
|
+ isValidate=this.validate()
|
|
|
+ if (isValidate) {
|
|
|
purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
|
|
|
console.log(response)
|
|
|
// this.tableData = response.records
|
|
|
-
|
|
|
this.isCountShow = false
|
|
|
})
|
|
|
- break;
|
|
|
- case "编辑":
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "编辑":
|
|
|
+ isValidate=this.validate()
|
|
|
+ if (isValidate) {
|
|
|
purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
|
console.log(response)
|
|
|
// this.tableData = response.records
|
|
|
this.isCountShow = false
|
|
|
})
|
|
|
- break;
|
|
|
- }
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
},
|
|
|
// 关闭
|
|
@@ -1223,4 +1232,19 @@
|
|
|
font-weight: 500;
|
|
|
color: #262626;
|
|
|
}
|
|
|
+ .double {
|
|
|
+ background: #FEFBF6 !important;
|
|
|
+ }
|
|
|
+ .single {
|
|
|
+ background: #F7FBFF !important;
|
|
|
+ }
|
|
|
+ .bottom-btn{
|
|
|
+ display: flex;
|
|
|
+ .left{
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ margin: 20px 0;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
</style>
|