|
@@ -697,6 +697,22 @@
|
|
|
}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ width="200px"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="removeItem(scope.row)"
|
|
|
+ :disabled="associationItemId == scope.row.itemId"
|
|
|
+ >撤销
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
<!-- 结算规则列表 -->
|
|
@@ -789,6 +805,7 @@ import {
|
|
|
getRuleListNoPage,
|
|
|
getRuleDetailByRuleId,
|
|
|
editRuleIdByItemId,
|
|
|
+ removeRelateByItemId,
|
|
|
} from "@/api/goodsManagement/goods";
|
|
|
import selectTree from "./selectTree.vue";
|
|
|
import textEditor from "./textEditor.vue";
|
|
@@ -818,6 +835,7 @@ export default {
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
|
ids: null,
|
|
|
+ idElse: null,
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
|
// 非多个禁用
|
|
@@ -1058,6 +1076,16 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ removeItem(item) {
|
|
|
+ removeRelateByItemId({ itemId: item.itemId })
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("撤销成功");
|
|
|
+ this.showItemList(this.idElse);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error("出错了,请联系管理员");
|
|
|
+ });
|
|
|
+ },
|
|
|
lookDetail(item) {
|
|
|
getRuleDetailByRuleId({ ruleId: item.ruleId }).then((res) => {
|
|
|
this.ruleVisible = true;
|
|
@@ -1068,6 +1096,7 @@ export default {
|
|
|
showItemList(item) {
|
|
|
getListByRelateId({ relateId: item.relateId })
|
|
|
.then((res) => {
|
|
|
+ this.idElse = item;
|
|
|
this.associationListVisible = true;
|
|
|
this.associationList = res.data;
|
|
|
this.associationItemId = item.itemId;
|