|
@@ -17,7 +17,7 @@
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
-<!-- <el-col :span="1.5">
|
|
|
+ <el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
@@ -40,18 +40,6 @@
|
|
|
>修改
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleBatch"
|
|
|
- v-if="isApprove==0"
|
|
|
- v-hasPermi="['pssr:pipe:edit']"
|
|
|
- >批量修改
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="danger"
|
|
@@ -64,17 +52,17 @@
|
|
|
>删除
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- icon="el-icon-upload2"
|
|
|
- size="mini"
|
|
|
- @click="handleImport"
|
|
|
- v-hasPermi="['pssr:material:edit']"
|
|
|
- v-if="isApprove==0"
|
|
|
- >导入
|
|
|
- </el-button>
|
|
|
- </el-col>-->
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ icon="el-icon-upload2"
|
|
|
+ size="mini"
|
|
|
+ @click="handleImport"
|
|
|
+ v-hasPermi="['pssr:material:edit']"
|
|
|
+ v-if="isApprove==0"
|
|
|
+ >导入
|
|
|
+ </el-button>
|
|
|
+ </el-col>-->
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="warning"
|
|
@@ -95,7 +83,8 @@
|
|
|
@click="handleBatch"
|
|
|
v-if="isApprove==0"
|
|
|
v-hasPermi="['pssr:material:edit']"
|
|
|
- >批量操作</el-button>
|
|
|
+ >批量操作
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -177,15 +166,15 @@
|
|
|
icon="el-icon-folder"
|
|
|
|
|
|
@click="handleDoc(scope.row)"
|
|
|
- >附件({{scope.row.fileNum}})
|
|
|
+ >附件({{ scope.row.fileNum }})
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
- v-hasPermi="['pssr:file:specialEdit']"
|
|
|
+ v-hasPermi="['pssr:date:edit']"
|
|
|
icon="el-icon-folder"
|
|
|
@click="handleDocSpecial(scope.row)"
|
|
|
- >附件(管)({{scope.row.fileNum}})
|
|
|
+ >附件(管)({{ scope.row.fileNum }})
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -218,8 +207,20 @@
|
|
|
<!-- 添加或修改原料对话框 -->
|
|
|
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="数量" prop="quantity">
|
|
|
- <el-input v-model="form.quantity" placeholder="请输入Quantity"/>
|
|
|
+ <el-form-item label="公用工程物料" prop="utilityQuantity">
|
|
|
+ <el-input v-model="form.utilityQuantity" placeholder="请输入公用工程物料"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="条件/存量">
|
|
|
+ <el-radio-group v-model="form.statusType" @input="changeQuantity">
|
|
|
+ <el-radio :label="1">具备投用状态</el-radio>
|
|
|
+ <el-radio :label="0">具体投用数量</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="具体投用数量" v-if="qFlag">
|
|
|
+ <el-input v-model="form.quantity" placeholder="请输入具体投用数量"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单位" prop="unit">
|
|
|
+ <el-input v-model="form.unit" placeholder="请输入单位"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="确认人" prop="confirm1">
|
|
|
<el-select v-model="form.confirm1" filterable placeholder="请选择确认人">
|
|
@@ -240,7 +241,7 @@
|
|
|
</el-dialog>
|
|
|
<!-- 批量修改对话框 -->
|
|
|
<el-dialog :close-on-click-modal="false" title="批量修改" :visible.sync="openBatch" width="500px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" label-width="80px">
|
|
|
+ <el-form ref="form" :model="form" label-width="80px">
|
|
|
<el-form-item>
|
|
|
<span>已选择 {{ ids.length }} 条数据</span>
|
|
|
</el-form-item>
|
|
@@ -253,7 +254,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remarks">
|
|
|
- <el-input v-model="form.remarks" placeholder="请输入备注" />
|
|
|
+ <el-input v-model="form.remarks" placeholder="请输入备注"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -301,15 +302,15 @@
|
|
|
width="1000px">
|
|
|
<el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
|
|
|
</el-dialog>
|
|
|
- <!-- 驳回原因对话框 -->
|
|
|
+ <!-- 驳回原因对话框 -->
|
|
|
<el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="reason.open" append-to-body title="驳回"
|
|
|
width="1000px">
|
|
|
- <el-table :data="items" border>
|
|
|
+ <el-table :data="items" border>
|
|
|
<el-table-column label="公用工程物料" align="center" prop="utilityQuantity"
|
|
|
:show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="驳回原因" align="center" prop="reason" :show-overflow-tooltip="true">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
|
|
|
+ <el-input v-model="scope.row.reason" placeholder="请输入驳回原因"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -318,7 +319,7 @@
|
|
|
<el-button @click="reasonCancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -359,6 +360,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ qFlag: false,
|
|
|
reason: {
|
|
|
open: false
|
|
|
},
|
|
@@ -441,7 +443,8 @@ export default {
|
|
|
],
|
|
|
confirm2: [
|
|
|
{required: true, message: "确认人2不能为空", trigger: "blur"}
|
|
|
- ],}
|
|
|
+ ],
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -462,6 +465,15 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeQuantity(label){
|
|
|
+ console.log(label)
|
|
|
+ if (label==1) {
|
|
|
+ this.qFlag=false;
|
|
|
+ }else{
|
|
|
+ this.form.quantity='';
|
|
|
+ this.qFlag=true;
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 查询原料列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -516,7 +528,7 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.items=selection;
|
|
|
+ this.items = selection;
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
@@ -535,10 +547,19 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改原料";
|
|
|
+
|
|
|
+ if (this.form.quantity == '具备投用状态') {
|
|
|
+ this.form.statusType = 1;
|
|
|
+ } else {
|
|
|
+ this.form.statusType = 0;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
+ if (this.form.statusType == 1) {
|
|
|
+ this.form.quantity = '具备投用状态'
|
|
|
+ }
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
@@ -662,7 +683,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleTurnDown(val) {
|
|
|
- this.reason.open=true;
|
|
|
+ this.reason.open = true;
|
|
|
},
|
|
|
userFormat(userId) {
|
|
|
for (let item of this.userOptions) {
|
|
@@ -675,14 +696,14 @@ export default {
|
|
|
reasonCancel() {
|
|
|
this.reason.open = false;
|
|
|
},
|
|
|
- submitReasonForm(){
|
|
|
+ submitReasonForm() {
|
|
|
handleTurnDownMaterial(this.items).then(res => {
|
|
|
this.msgSuccess("驳回成功");
|
|
|
this.reason.open = false;
|
|
|
this.$emit('refreshHisList');
|
|
|
})
|
|
|
},
|
|
|
- handleBatch(){
|
|
|
+ handleBatch() {
|
|
|
this.reset();
|
|
|
this.openBatch = true
|
|
|
},
|