|
@@ -69,13 +69,15 @@ export default {
|
|
handleSynchronousMaterial(tableOne, tableTwo) {
|
|
handleSynchronousMaterial(tableOne, tableTwo) {
|
|
let _this = this;
|
|
let _this = this;
|
|
// this.params[tableOne]-- -> this.params[tableTwo]
|
|
// this.params[tableOne]-- -> this.params[tableTwo]
|
|
- this.params[tableOne] &&
|
|
|
|
|
|
+ this.params[tableOne] && this.params[tableOne].length &&
|
|
|
|
|
|
this.params[tableOne].forEach((item, index) => {
|
|
this.params[tableOne].forEach((item, index) => {
|
|
|
|
|
|
for (const key in item) {
|
|
for (const key in item) {
|
|
|
|
|
|
- if (key in _this.params[tableTwo][index]) {
|
|
|
|
|
|
+ if ( _this.params[tableTwo][index] &&
|
|
|
|
+ ( key in _this.params[tableTwo][index])
|
|
|
|
+ ) {
|
|
|
|
|
|
_this.params[tableTwo][index].material = item.material;
|
|
_this.params[tableTwo][index].material = item.material;
|
|
|
|
|
|
@@ -178,21 +180,29 @@ export default {
|
|
},
|
|
},
|
|
// 判断保存条件
|
|
// 判断保存条件
|
|
judgeSaveCondition(cb){
|
|
judgeSaveCondition(cb){
|
|
|
|
+ const _this = this;
|
|
this.$refs['orderEditForm'].validate(async (valid) => {
|
|
this.$refs['orderEditForm'].validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
|
- // 执行结果在审批之后出现 !this.params['puOrderExecuteList'].length
|
|
|
|
- if(!this.params['puOrderItemList'].length ){
|
|
|
|
-
|
|
|
|
- this.$message.error('请填写订单行!');
|
|
|
|
|
|
+ // 执行结果在审批之后出现
|
|
|
|
+ let validList = _this.params['puOrderItemList'].filter(item => item.delFlag === '0');
|
|
|
|
+ if(!validList.length ){
|
|
|
|
+ _this.$notify.error({
|
|
|
|
+ title: '错误',
|
|
|
|
+ message: '请填写订单行!'
|
|
|
|
+ });
|
|
|
|
+
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- let isPrice = this.params.puOrderItemList.filter(item => !item.whetherCompleteInquiry);
|
|
|
|
|
|
+ let isPrice = _this.params.puOrderItemList.filter(item => !item.whetherCompleteInquiry);
|
|
|
|
|
|
if(isPrice.length){
|
|
if(isPrice.length){
|
|
|
|
|
|
- this.$message.error('询价失败!');
|
|
|
|
|
|
+ _this.$notify.error({
|
|
|
|
+ title: '错误',
|
|
|
|
+ message: '询价失败!'
|
|
|
|
+ });
|
|
return false
|
|
return false
|
|
|
|
|
|
}
|
|
}
|
|
@@ -200,7 +210,10 @@ export default {
|
|
cb();
|
|
cb();
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- this.$message.error('存在必填项未填写');
|
|
|
|
|
|
+ _this.$notify.error({
|
|
|
|
+ title: '错误',
|
|
|
|
+ message: '存在必填项未填写'
|
|
|
|
+ });
|
|
console.log('error submit!!');
|
|
console.log('error submit!!');
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -487,8 +500,8 @@ export default {
|
|
">
|
|
">
|
|
<h3>{{ handleIsRevise() ? '修订' : '编辑' }}</h3>
|
|
<h3>{{ handleIsRevise() ? '修订' : '编辑' }}</h3>
|
|
<div style="text-align: right">
|
|
<div style="text-align: right">
|
|
|
|
+ <el-button :size="size" type="primary" @click="handleSava">更 新</el-button>
|
|
<el-button :size="size" @click="handleCancel">取 消</el-button>
|
|
<el-button :size="size" @click="handleCancel">取 消</el-button>
|
|
- <el-button :size="size" type="danger" @click="handleSava">更 新</el-button>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<el-row style="display:flex; flex-wrap: wrap;">
|
|
<el-row style="display:flex; flex-wrap: wrap;">
|
|
@@ -531,6 +544,7 @@ export default {
|
|
<el-input-number v-if="column.inputType === 'InputNumber'"
|
|
<el-input-number v-if="column.inputType === 'InputNumber'"
|
|
v-model="params[column.key]"
|
|
v-model="params[column.key]"
|
|
:precision="column.precision"
|
|
:precision="column.precision"
|
|
|
|
+ :min="column.min || 0"
|
|
:max="handleIsRevise() ? params[column.key] : Infinity"
|
|
:max="handleIsRevise() ? params[column.key] : Infinity"
|
|
:controls-position="column.controlsPosition"
|
|
:controls-position="column.controlsPosition"
|
|
:placeholder="column.placeholder"
|
|
:placeholder="column.placeholder"
|