|
|
@@ -627,7 +627,7 @@
|
|
|
>删除
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- v-if="isDisabled"
|
|
|
+ v-if="isDisabled&&tenantId!='681169'"
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
@@ -1161,6 +1161,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ tenantId:null,
|
|
|
synchronizeDialog: false,
|
|
|
synchronizeId: null,
|
|
|
treeDataSynchronize: [],
|
|
|
@@ -2201,6 +2202,7 @@ export default {
|
|
|
},
|
|
|
//初始化查询
|
|
|
async created() {
|
|
|
+ this.tenantId = this.$store.getters.userInfo.tenant_id;
|
|
|
this.rowHeight = window.innerHeight - 130 + "px";
|
|
|
this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
|
|
|
this.getWorkDicts("payment_term").then(res => {
|
|
|
@@ -4100,28 +4102,28 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- validateInventoryAndPrice() {
|
|
|
- const data = this.goodsActives === "gift" ? this.contactsData : this.goodsShowData;
|
|
|
- for (let i = 0; i < data.length; i++) {
|
|
|
- const item = data[i];
|
|
|
- if (Number(item.orderQuantity) > Number(item.storageQuantity)) {
|
|
|
- return this.$message.error(`商品信息第${i + 1}行订货数量大于库存数量`);
|
|
|
- }
|
|
|
- if (!Number(item.purchaseAmount)) {
|
|
|
- return this.$message.error(`商品信息第${i + 1}行采购价格不能为空`);
|
|
|
- }
|
|
|
- if (Number(item.purchaseAmount) === 0) {
|
|
|
- return this.$message.error(`商品信息第${i + 1}行采购价格不能为0`);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //修改提交触发
|
|
|
+ validateInventoryAndPrice() {
|
|
|
+ const data = this.goodsActives === "gift" ? this.contactsData : this.goodsShowData;
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ const item = data[i];
|
|
|
+ if (Number(item.orderQuantity) > Number(item.storageQuantity)) {
|
|
|
+ return this.$message.error(`商品信息第${i + 1}行订货数量大于库存数量`);
|
|
|
+ }
|
|
|
+ if (!Number(item.purchaseAmount)) {
|
|
|
+ return this.$message.error(`商品信息第${i + 1}行采购价格不能为空`);
|
|
|
+ }
|
|
|
+ if (Number(item.purchaseAmount) === 0) {
|
|
|
+ return this.$message.error(`商品信息第${i + 1}行采购价格不能为0`);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //修改提交触发
|
|
|
async editCustomer(isBack = false, type, other) {
|
|
|
this.$refs["form"].validate(async valid => {
|
|
|
if (valid) {
|
|
|
console.log(this.contactsData);
|
|
|
const length1 = this.goodsActives === "goods" ? this.giftData : this.goodsShowData;
|
|
|
- const length = this.goodsActives === "gift" ? this.contactsData.length : this.goodsShowData.length;
|
|
|
+ const length = this.goodsActives === "gift" ? this.contactsData.length : this.goodsShowData.length;
|
|
|
for (let i = 0; i < length; i++) {
|
|
|
const data = this.goodsActives === "gift" ? this.contactsData : this.goodsShowData;
|
|
|
if (Number(data[i].orderQuantity) > Number(data[i].storageQuantity)) {
|
|
|
@@ -4808,7 +4810,7 @@ export default {
|
|
|
if (!this.form.id) {
|
|
|
return this.editCustomer(false, "", "check");
|
|
|
}
|
|
|
-/* this.validateInventoryAndPrice()
|
|
|
+ /* this.validateInventoryAndPrice()
|
|
|
let goodsData = this.form.orderItemsList.filter(item => item.goodType == 0);
|
|
|
for (let item in goodsData) {
|
|
|
if (Number(goodsData[item].orderQuantity) > Number(goodsData[item].storageQuantity)) {
|