|
|
@@ -108,6 +108,8 @@
|
|
|
<el-form-item>
|
|
|
<el-button icon="el-icon-check" type="goon" size="mini" :loading="buttonLoading1"
|
|
|
v-privilege="activeMenu + 'audit'" @click="audit">审批通过</el-button>
|
|
|
+ <el-button icon="el-icon-edit" type="goon" size="mini"
|
|
|
+ v-privilege="activeMenu + 'editEntrustType'" @click="editEntrustType">修改委托类型</el-button>
|
|
|
<!-- <el-button icon="el-icon-check" type="goon" size="mini" :loading='buttonLoading1' v-privilege="activeMenu + 'audit'" @click="audit">审批</el-button> -->
|
|
|
<!-- <el-button icon="el-icon-remove-outline" type="danger" :loading='buttonLoading2' v-privilege="activeMenu + 'cancel'" @click="cancel" size="mini">
|
|
|
取消
|
|
|
@@ -508,6 +510,64 @@
|
|
|
<el-button size="mini" type="goon" icon="el-icon-remove-outline" @click="closebatch">取消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="修改委托类型" :visible.sync="dialogEntrustVisible" width="80%" center>
|
|
|
+ <el-table ref="table12" border :data="multipleSelection1">
|
|
|
+ <el-table-column type="index" label="NO" fixed="left" align="center" width="45"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip align="center" width="100" prop="ENTR_TYPE_NAME"
|
|
|
+ label="委托类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.entrTypeCode"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ style="width: 100%"
|
|
|
+ collapse-tags
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in entrTypeNameType"
|
|
|
+ :key="index"
|
|
|
+ :label="item.baseName"
|
|
|
+ :value="item.baseCode"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-if="isShowSuppName" sortable show-overflow-tooltip align="center" width="135"
|
|
|
+ prop="SUPP_NAME" label="供应商">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.SUPP_NAME
|
|
|
+ ? scope.row.SUPP_NAME - 0 === -1
|
|
|
+ ? ""
|
|
|
+ : scope.row.SUPP_NAME
|
|
|
+ : ""
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip align="center" min-width="80" prop="DEPT_NAME"
|
|
|
+ label="检验车间"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip align="center" min-width="80" prop="SECTION_NAME"
|
|
|
+ label="检验班组"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip fixed="left" align="center" min-width="50" prop="bool"
|
|
|
+ label="状态"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip fixed="left" align="center" min-width="100"
|
|
|
+ prop="SAMPLE_NO" label="中心编号"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip fixed="left" align="center" min-width="100"
|
|
|
+ prop="CAR_NO" label="委托编号"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip fixed="left" align="center" min-width="100"
|
|
|
+ prop="MAT_NAME" label="物料名称"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip align="center" min-width="80" prop="SAMPLE_TYPE_NAME"
|
|
|
+ label="样品类型"></el-table-column>
|
|
|
+ <el-table-column sortable show-overflow-tooltip align="center" min-width="75px" prop="ENTR_MEMO"
|
|
|
+ label="委托备注"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="mini" type="goon" icon="el-icon-remove-outline" @click="closeDialog">取消</el-button>
|
|
|
+ <el-button size="mini" type="primary" icon="el-icon-check" @click="modifyEntrustData">保存</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<div is="historyAlert" :showFlag="historyShowFlag" :Params="Params" @refresh="refresh"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -532,6 +592,7 @@ export default {
|
|
|
times: "",
|
|
|
},
|
|
|
dialogTableVisible: false,
|
|
|
+ dialogEntrustVisible: false,
|
|
|
historyShowFlag: false,
|
|
|
Params: {},
|
|
|
isShowSuppName: false,
|
|
|
@@ -596,6 +657,7 @@ export default {
|
|
|
backLoading: false, // 审核不通过
|
|
|
valSource: "", // 原始数据来源
|
|
|
curSrId: "", // 原始数据srid
|
|
|
+ entrTypeNameType: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -653,6 +715,71 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ closeDialog() {
|
|
|
+ this.dialogEntrustVisible = false;
|
|
|
+ },
|
|
|
+ editEntrustType() {
|
|
|
+ if (this.multipleSelection1.length === 0) {
|
|
|
+ this.$message.warning('请选择一条数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.getEntrustType()
|
|
|
+ this.dialogEntrustVisible = true;
|
|
|
+ },
|
|
|
+ modifyEntrustData() {
|
|
|
+ this.$confirm("确定修改以上单据的委托类型吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ let map = {}
|
|
|
+ map.userName = userName
|
|
|
+ map.list = this.multipleSelection1
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ "pass/testManagement/v1/limssampleresults/updateEntrustType",
|
|
|
+ map,
|
|
|
+ { individualType: "json" }
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.status === "succeed") {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.dataMain();
|
|
|
+ this.dialogEntrustVisible = false
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }).catch((err) => {
|
|
|
+ this.$message.error(err.message);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getEntrustType() {
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ "pass/baseManagement/v1/limsbaseinfos/queryBaseInfoByBaseCode",
|
|
|
+ { validFlag: 1, baseCode: 4802 },
|
|
|
+ { individualType: "json" }
|
|
|
+ )
|
|
|
+ .then((res) => {
|
|
|
+ this.entrTypeNameType = res.data;
|
|
|
+ // this.baseData.entrTypeCode = this.getCode(
|
|
|
+ // "内部",
|
|
|
+ // this.entrTypeNameType,
|
|
|
+ // "baseName",
|
|
|
+ // "baseCode"
|
|
|
+ // );
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getCode(code, arr, codeKey, nameKey) {
|
|
|
+ if (!code || !arr) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ let targetRow = arr.find((item) => {
|
|
|
+ return item[codeKey] === code;
|
|
|
+ });
|
|
|
+ // console.log(targetRow, 'targetRow');
|
|
|
+ return targetRow ? targetRow[nameKey] : "";
|
|
|
+ },
|
|
|
getYNM(date) {
|
|
|
let year = date.getFullYear().toString();
|
|
|
let month = date.getMonth() + 1;
|