|
@@ -82,9 +82,9 @@ export default {
|
|
|
// 判断属性是否禁用
|
|
|
handleIsForbidden(status) {
|
|
|
console.log(status);
|
|
|
- let { editColumns, editTabColumns } = forbidden(status != '2');
|
|
|
- this.columns = editColumns;
|
|
|
- this.tabColumns = editTabColumns;
|
|
|
+ let { editColumns: updateColumns, editTabColumns: updateTabColumns } = forbidden(status != '2');
|
|
|
+ this.columns = updateColumns;
|
|
|
+ this.tabColumns = updateTabColumns;
|
|
|
},
|
|
|
// 查询详细
|
|
|
async fetchItem(prop) {
|
|
@@ -93,7 +93,6 @@ export default {
|
|
|
const { code, msg, data } = await orderApi.details(prop);
|
|
|
if (code === 200) {
|
|
|
this.params = { ...this.params, ...data };
|
|
|
- console.log(this.params, 'this.params----------123');
|
|
|
this.handleIsForbidden(this.params.status);
|
|
|
}
|
|
|
} catch (err) {
|
|
@@ -110,13 +109,21 @@ export default {
|
|
|
if (Array.isArray(this.params[key])) {
|
|
|
|
|
|
const arr = this.tabColumns.find(
|
|
|
+
|
|
|
(element) => element.key === key
|
|
|
+
|
|
|
).tableColumns;
|
|
|
|
|
|
+
|
|
|
let rowData = initParams(arr, "key", "value");
|
|
|
|
|
|
- 'rowno' in rowData && (rowData['rowno'] = this.params[key].length + 1);
|
|
|
- 'rowNo' in rowData && (rowData['rowNo'] = this.params[key].length + 1);
|
|
|
+ "rowno" in rowData &&
|
|
|
+ (rowData["rowno"] = this.params[key].length + 1);
|
|
|
+ "rowNo" in rowData &&
|
|
|
+ (rowData["rowNo"] = this.params[key].length + 1);
|
|
|
+
|
|
|
+ // 是否完成询价,新增明细行需默认明细为false
|
|
|
+ rowData['whetherCompleteInquiry'] = false;
|
|
|
|
|
|
this.params[key].push(rowData);
|
|
|
}
|
|
@@ -140,7 +147,11 @@ export default {
|
|
|
// 取消
|
|
|
handleCancel() {
|
|
|
this.setVisible(false);
|
|
|
- this.params = initParams(this.columns, "key", "value");
|
|
|
+ this.params = {
|
|
|
+ ...initParams(this.columns),
|
|
|
+ puOrderItemList: [],
|
|
|
+ puOrderExecuteList: [],
|
|
|
+ }
|
|
|
},
|
|
|
// 保存
|
|
|
async handleSava() {
|
|
@@ -153,7 +164,7 @@ export default {
|
|
|
: orderApi.edit(this.params)
|
|
|
)
|
|
|
if (code === 200) {
|
|
|
- this.setVisible(false);
|
|
|
+ this.handleCancel();
|
|
|
}
|
|
|
} catch (err) {
|
|
|
//
|
|
@@ -255,7 +266,7 @@ export default {
|
|
|
style="width: 100%">
|
|
|
</el-input>
|
|
|
<el-input-number v-if="column.inputType === 'InputNumber'" v-model="params[column.key]"
|
|
|
- :max="handleIsRevise(params.status) ? params[column.key] : 'Infinity'"
|
|
|
+ :max="handleIsRevise(params.status) ? params[column.key] : Infinity"
|
|
|
:controls-position="column.controlsPosition" :placeholder="column.placeholder"
|
|
|
:clearable="column.clearable" :disabled="column.disabled" style="width: 100%">
|
|
|
</el-input-number>
|
|
@@ -335,7 +346,7 @@ export default {
|
|
|
</el-checkbox>
|
|
|
<el-input-number v-if="cColumn.inputType === 'InputNumber'" v-model="scope.row[cColumn.key]"
|
|
|
:controls-position="cColumn.controlsPosition"
|
|
|
- :max="handleIsRevise(params.status) ? scope.row[cColumn.key] : 'Infinity'"
|
|
|
+ :max="handleIsRevise(params.status) ? scope.row[cColumn.key] : Infinity"
|
|
|
@change="handleInputChange(scope.row, cColumn.key)" :placeholder="cColumn.placeholder"
|
|
|
:clearable="cColumn.clearable" :disabled="cColumn.disabled" :size="size" style="width: 100%">
|
|
|
</el-input-number>
|