|
@@ -101,6 +101,17 @@
|
|
|
>导出
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleBatch"
|
|
|
+ v-hasPermi="['pssr:materialRaw:edit']"
|
|
|
+ >批量操作</el-button>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="success"
|
|
@@ -245,6 +256,80 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 添加或修改原料对话框 -->
|
|
|
+ <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="Quantity" prop="quantity">
|
|
|
+ <el-input v-model="form.quantity" placeholder="请输入Quantity"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="Note" prop="note">
|
|
|
+ <el-input v-model="form.note" placeholder="请输入Note"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认人1" prop="confirm1">
|
|
|
+ <el-select v-model="form.confirm1" filterable placeholder="请选择确认人1">
|
|
|
+ <el-option v-for="user in userOptions"
|
|
|
+ :label="user.nickName"
|
|
|
+ :value="user.userId+''"
|
|
|
+ :key="user.userId"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认人2" prop="confirm2">
|
|
|
+ <el-select v-model="form.confirm2" filterable placeholder="请选择确认人1">
|
|
|
+ <el-option v-for="user in userOptions"
|
|
|
+ :label="user.nickName"
|
|
|
+ :value="user.userId+''"
|
|
|
+ :key="user.userId"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remarks">
|
|
|
+ <el-input v-model="form.remarks" placeholder="请输入备注"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </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-item>
|
|
|
+ <span>已选择 {{ ids.length }} 条数据</span>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认人1" prop="confirm1">
|
|
|
+ <el-select v-model="form.confirm1" filterable placeholder="请选择确认人1">
|
|
|
+ <el-option v-for="user in userOptions"
|
|
|
+ :label="user.nickName"
|
|
|
+ :value="user.userId+''"
|
|
|
+ :key="user.userId"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="确认人2" prop="confirm2">
|
|
|
+ <el-select v-model="form.confirm2" filterable placeholder="请选择确认人1">
|
|
|
+ <el-option v-for="user in userOptions"
|
|
|
+ :label="user.nickName"
|
|
|
+ :value="user.userId+''"
|
|
|
+ :key="user.userId"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="时间确认" prop="confirmationDate">
|
|
|
+ <el-date-picker clearable size="small" style="width: 200px"
|
|
|
+ v-model="form.confirmationDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" prop="remarks">
|
|
|
+ <el-input v-model="form.remarks" placeholder="请输入备注" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitFormBatch">确 定</el-button>
|
|
|
+ <el-button @click="cancelBatch">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!-- 用户导入对话框 -->
|
|
|
<el-dialog :close-on-click-modal="false" :title="upload.title" :visible.sync="upload.open" width="400px"
|
|
|
append-to-body>
|
|
@@ -290,7 +375,8 @@ import {
|
|
|
handleTurnDownMaterialRaw,
|
|
|
importTemplate,
|
|
|
listMaterialRaw,
|
|
|
- updateMaterialRaw
|
|
|
+ updateMaterialRaw,
|
|
|
+ updateMaterialRawBatch
|
|
|
} from "@/api/pssr/materialRaw";
|
|
|
import {treeselect} from "@/api/system/dept";
|
|
|
import {getToken} from "@/utils/auth";
|
|
@@ -337,6 +423,7 @@ export default {
|
|
|
clientHeight: 300,
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ openBatch: false,
|
|
|
// 用户导入参数
|
|
|
upload: {
|
|
|
// 是否显示弹出层(用户导入)
|
|
@@ -472,6 +559,28 @@ export default {
|
|
|
this.open = true;
|
|
|
this.title = "添加原料";
|
|
|
},
|
|
|
+ handleBatch(){
|
|
|
+ this.reset();
|
|
|
+ this.openBatch = true
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancelBatch() {
|
|
|
+ this.openBatch = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitFormBatch() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.form.ids = this.ids
|
|
|
+ updateMaterialRawBatch(this.form).then(response => {
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|