From 7fb0a8f0ab16c149484bf043754cd10cfa94de2f Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 19 一月 2026 14:48:05 +0800
Subject: [PATCH] 增加了业务员,保管员和验收员的对应的显示
---
src/views/ICMO/ScICMOBillList.vue | 199 +++++++++++++++++++++++++++----------------------
1 files changed, 110 insertions(+), 89 deletions(-)
diff --git a/src/views/ICMO/ScICMOBillList.vue b/src/views/ICMO/ScICMOBillList.vue
index 7c13427..2c9388c 100644
--- a/src/views/ICMO/ScICMOBillList.vue
+++ b/src/views/ICMO/ScICMOBillList.vue
@@ -1,5 +1,5 @@
<template>
- <div style="padding: 10px">
+ <div style="padding: 10px; position: relative;">
<el-form
:model="queryParams"
ref="queryForm"
@@ -9,15 +9,27 @@
class="searchBox"
>
<el-row>
- <el-form-item label="鏃ユ湡" style="margin-left: 100px">
+ <el-form-item label="寮�濮嬫棩鏈�" style="margin-left: 100px">
<el-date-picker
- v-model="dateRange"
+ v-model="sTime"
+ type="date"
+ placeholder="寮�濮嬫棩鏈�"
+ style="width: 150px"
+ :disabled="queryParams.HInitTimeCycle != -1"
value-format="yyyy-MM-dd"
- type="daterange"
- range-separator="-"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- ></el-date-picker>
+ >
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="缁撴潫鏃ユ湡">
+ <el-date-picker
+ v-model="eTime"
+ type="date"
+ placeholder="缁撴潫鏃ユ湡"
+ style="width: 150px"
+ :disabled="queryParams.HInitTimeCycle != -1"
+ value-format="yyyy-MM-dd"
+ >
+ </el-date-picker>
</el-form-item>
<el-form-item label="鏃ユ湡闂撮殧">
<el-select
@@ -51,7 +63,7 @@
v-for="(item, index) in organizationList"
:key="index"
:label="item.Name"
- :value="item.ID"
+ :value="item.ID.toString()"
>
</el-option>
</el-select>
@@ -68,8 +80,8 @@
<el-option
:label="item.label"
:value="item.value"
- :key="item.label"
- v-for="item in [
+ :key="index"
+ v-for="(item, index) in [
{
label: '寮�宸�',
value: '寮�宸�',
@@ -562,9 +574,10 @@
<span v-if="column.property.includes('鏃ユ湡')">{{
parseTime(row[column.property], "{y}-{m}-{d}")
}}</span>
+
<el-button
type="text"
- @click="handleEdit(row, (OperationType = 3))"
+ @click.stop="handleEdit(row, (OperationType = 3))"
v-else-if="column.property == '鍗曟嵁鍙�'"
>{{ row.鍗曟嵁鍙� }}</el-button
>
@@ -604,7 +617,7 @@
class="xsckdBox"
:before-close="close"
>
- <edit
+ <!-- <edit
:OperationType="OperationType"
:linterid="this.rowForm.HItemID"
:HSouceBillType="this.rowForm.HSourceBillType"
@@ -612,7 +625,11 @@
:copyType="copyType"
@editCloseGy="editGyClose"
v-if="editShow"
- />
+ /> -->
+
+ <div style="height: 70vh" v-if="openEdit">
+ <iframe :src="iframeUrl" width="100%" height="100%" frameborder="0"></iframe>
+ </div>
</el-dialog>
<el-dialog
:title="upload.title"
@@ -711,15 +728,17 @@
import dayjs from "dayjs";
export default {
- name: "GySource",
+ name: "ScICMOBillList",
components: { RowSettings },
props: {
openPage: { type: String },
},
data() {
return {
+ iframeUrl: "",
activeSeach: "",
- HModName: "Cg_POOrderBillList",
+ HModName: "Sc_ICMOBillList",
+ rowList:[],
editShow: false,
openEdit: false,
totalNameList: [],
@@ -728,7 +747,7 @@
openPrintList: false,
printListShow: false,
HClassTag: "ForFilteringSchemes", //杩囨护鏉′欢鐨刢lass绫�
- HBillType: "1202",
+ HBillType: "3710",
openBtnHide: false,
btnHideShow: false,
rowHideShow: false,
@@ -761,6 +780,7 @@
{ label: "杩�30澶�", value: 29 },
{ label: "杩戝崐骞�", value: 180 },
{ label: "杩戜竴骞�", value: 365 },
+ { label: "浠绘剰闂撮殧", value: -1 },
],
hPriceTypeList: ["鎴愭湰浠�", "缁撶畻浠�"],
addBtnShow: false,
@@ -781,7 +801,6 @@
OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
- user: "admin",
currentRow: [],
lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
lastSelectedRow: null, // 涓婁竴娆¢�変腑鐨勮
@@ -800,7 +819,7 @@
dateRange: [],
// 鏌ヨ鍙傛暟
queryParams: {
- HOrgID: null,
+ HOrgID: sessionStorage["OrganizationID"],
HName: null,
HNumber: null,
Comparator1: "",
@@ -865,8 +884,7 @@
updateSupport: 0,
// 璁剧疆涓婁紶鐨勮姹傚ご閮�
// headers: { Authorization: "Bearer " + getToken() },
- // 涓婁紶鐨勫湴鍧�
- url: "http://47.96.97.237/API/Gy_Source/Gy_Source_Excel",
+ url: "",
},
uploadData: [],
alluploadList: [],
@@ -877,17 +895,26 @@
uploadTotal: 0,
};
},
- mounted() {},
+ mounted() {
+ window.editGyClose = () => {
+ this.editGyClose(); // 缁勪欢鍐呯殑鏂规硶缁戝畾鍒皐indows
+ };
+ },
created() {
- this.form.Organization = sessionStorage["Organization"];
+ // set upload URL from configured baseURL
+ this.upload.url = this.$baseUrl + "Gy_Source/Gy_Source_Excel";
this.riqiChange();
this.get_HProjectList();
this.get_HDeptNameList();
this.getList();
},
+ beforeDestroy() {
+ // 缁勪欢閿�姣佹椂娓呯悊鍏ㄥ眬鏂规硶锛岄伩鍏嶅唴瀛樻硠婕�
+ delete window.editGyClose;
+ },
methods: {
syncBill() {
- axios.get(`${this.baseURL}/Sc_ICMOBill/Sc_ICMOBillViewApi`, {
+ axios.get(`${this.$baseUrl}/Sc_ICMOBill/Sc_ICMOBillViewApi`, {
params: {
BillNo: this.HBillNo2,
BillType: "3710",
@@ -895,16 +922,18 @@
});
},
async get_HDeptNameList() {
- let res = await axios.get(`${this.baseURL}/Sc_ICMOBill/GetHDeptList`, {
+ let res = await axios.get(`${this.$baseUrl}/Sc_ICMOBill/GetHDeptList`, {
params: { HOrgID: sessionStorage["OrganizationID"] },
});
- console.log(res);
- this.HDeptNameList = res.data.data.map((e) => {
- return { label: e.HName, value: e.HItemID };
- });
+ this.HDeptNameList = [
+ { label: "鍏ㄩ儴杞﹂棿", value: 0 },
+ ...res.data.data.map((e) => {
+ return { label: e.HName, value: e.HItemID };
+ }),
+ ];
},
async get_HProjectList() {
- let res = await axios.get(`${this.baseURL}/Gy_Material/Get_HProject`);
+ let res = await axios.get(`${this.$baseUrl}/Gy_Material/Get_HProject`);
this.HProjectList = res.data.data.map((e) => {
return { label: e.HName, value: e.HItemID };
});
@@ -952,7 +981,7 @@
defaintOperationByCompanyName() {
var result = false;
axios
- .get(this.baseURL + "/Xt_getInfo/getCompanyName")
+ .get(this.$baseUrl + "/Xt_getInfo/getCompanyName")
.then((res) => {
var data1 = res.data;
if (data1.count == 1) {
@@ -987,6 +1016,9 @@
this.getList();
},
riqiChange() {
+ if (this.queryParams.HInitTimeCycle == -1) {
+ return;
+ }
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * this.queryParams.HInitTimeCycle);
@@ -1037,62 +1069,31 @@
this.dbEmitData(this.deptform, this.dialogTypeNum);
this.deptform = {};
},
- fetchData() {
- //鐧诲綍鐢ㄦ埛淇℃伅
- axios
- .get(
- "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
- )
- .then((res) => {
- let data = res.data.data[0];
- this.zuzhiId = data.HUSEORGID; //鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇榛樿鐨勭粍缁嘔D
- this.queryParams.HOrgID = data.HUSEORGID;
- this.user = data.Czymc;
- axios
- .get(this.baseURL + "/Web/GetOrganizations", {})
- .then((res) => {
- if (res.data.count == 1) {
- this.organizationList = res.data.data; //缁勭粐鍒楄〃
- }
-
- this.handleQuery();
- // this.getList();
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- })
- .catch((error) => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- },
async getList() {
this.tableShow = false;
this.loading = true;
if (this.pageSize == 0) {
this.pageSize = 50;
}
- this.queryParams.HOrgID = sessionStorage["OrganizationID"];
- if (this.dateRange.length > 0) {
- this.sWhere +=
- " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.dateRange[0] + "'";
- this.sWhere +=
- " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.dateRange[1] + "'";
+ if (this.sTime) {
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.sTime + "'";
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.eTime + "'";
}
let Organization = this.organizationList.find(
- (e) => (e.ID = this.queryParams.HOrgID)
+ (e) => e.ID == this.queryParams.HOrgID
)?.Name;
+ console.log(this.queryParams.HOrgID);
console.log(Organization);
try {
let res = await axios.get(
- this.baseURL + "/LEMS/MES_IF_ICMOBillList_Json_byPage",
+ this.$baseUrl + "/LEMS/MES_IF_ICMOBillList_Json_byPage",
{
params: {
sWhere: this.sWhere,
- user: this.user,
+ user: sessionStorage["HUserName"],
Organization: Organization,
page: this.page,
size: this.pageSize,
@@ -1182,7 +1183,12 @@
}
}
option.data = result;
- this.DisPlay_HideColumn(this.HModName, this.user, option, this.dataList);
+ this.DisPlay_HideColumn(
+ this.HModName,
+ sessionStorage["HUserName"],
+ option,
+ this.dataList
+ );
}
} catch (err) {
this.$modal.msgError(`鑾峰彇鏀舵枡閫氱煡鍗曢敊璇�: ${err}`);
@@ -1191,7 +1197,7 @@
DisPlay_HideColumn(HModName, user, option, dataOption) {
this.totalNameList = [];
axios
- .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
+ .get(this.$baseUrl + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
params: {
HModName: HModName,
user: user,
@@ -1339,6 +1345,9 @@
this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
this.lastSelectedRowIndex = this.tableData.indexOf(row);
this.$refs.tableData.toggleRowSelection(row);
+ if (this.openPage) {
+ this.$emit('deptEmit', this.rowList, 10)
+ }
},
//閫変腑琛岄珮浜牱寮�
rowStyle({ row, rowIndex }) {
@@ -1349,11 +1358,12 @@
//鍙屽嚮琛�
handleDblclick(row, column, cell, event) {
this.OperationType = 3;
- this.handleEdit();
+ this.handleEdit(row, this.OperationType);
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
// this.rowForm = {}
+ this.rowList=selection
this.ids = selection.map((item) => item.hmainid);
this.single = selection.length != 1;
this.multiple = !selection.length;
@@ -1481,10 +1491,10 @@
getOrgIDByUser() {
var res = "";
axios
- .get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
+ .get(this.$baseUrl + "/Xt_User/getOrgIDListByUser", {
params: {
HModName: this.HModName,
- user: this.user,
+ user: sessionStorage["HUserName"],
HOrgID: this.zuzhiId,
},
})
@@ -1539,13 +1549,16 @@
//鎵撳紑鏂板缁勪欢寮圭獥
handleAddEdit() {
this.rowForm.HItemID = 0;
+ this.iframeUrl = `/iframe/ScICMOBillEdit?HInterID=0&OperationType=1`;
this.$nextTick(() => {
this.openEdit = true;
this.editShow = true;
});
},
//鎵撳紑淇敼缁勪欢寮圭獥
- handleEdit() {
+ handleEdit(row, OperationType) {
+ console.log(row);
+ this.iframeUrl = `/iframe/ScICMOBillEdit?HInterID=${row.hmainid}&OperationType=${OperationType}&HEntryID=${row.hsubid}`;
this.$nextTick(() => {
this.openEdit = true;
this.editShow = true;
@@ -1564,14 +1577,14 @@
.then(() => {
if (!this.rowForm.瀹℃牳浜�) {
axios
- .get(this.baseURL + "/Xs_SeOutStockBill/DeltetSeOutStockBill", {
+ .get(this.$baseUrl + "/Xs_SeOutStockBill/DeltetSeOutStockBill", {
params: {
HInter: this.rowForm.hmainid.toString(),
HsupId: this.rowForm.HsupId,
HQty: this.rowForm.HQty,
HSourceInterID: this.rowForm.HSourceInterID,
HSourceEntryID: this.rowForm.HSourceEntryID,
- user: this.user,
+ user: sessionStorage["HUserName"],
},
})
.then((res) => {
@@ -1596,8 +1609,12 @@
var InterID = form.HItemID || form.HInterID || form.hmainid;
//閫昏緫瀹℃牳鏂规硶
axios
- .get(this.baseURL + "/Xs_SeOutStockBill/CheckXs_SeOutStockBill", {
- params: { HInterID: InterID, TypeError: num, CurUserName: this.user },
+ .get(this.$baseUrl + "/Xs_SeOutStockBill/CheckXs_SeOutStockBill", {
+ params: {
+ HInterID: InterID,
+ TypeError: num,
+ CurUserName: sessionStorage["HUserName"],
+ },
})
.then((res) => {
let result = res.data;
@@ -1617,12 +1634,12 @@
let HInterID = form.HItemID || form.HInterID || form.hmainid;
try {
let res = await axios.get(
- `${this.baseURL}/Xs_SeOutStockBill/CloseXs_SeOutStockBill`,
+ `${this.$baseUrl}/Xs_SeOutStockBill/CloseXs_SeOutStockBill`,
{
params: {
HInterID: HInterID,
Type: num,
- user: this.user,
+ user: sessionStorage["HUserName"],
},
}
);
@@ -1644,13 +1661,13 @@
let HEntryID = form.HEntryID || form.hsubid;
try {
let res = await axios.get(
- `${this.baseURL}/Xs_SeOutStockBill/CloseRowXs_SeOutStockBill`,
+ `${this.$baseUrl}/Xs_SeOutStockBill/CloseRowXs_SeOutStockBill`,
{
params: {
HInterID: HInterID,
HEntryID: HEntryID,
ISAudit: num,
- CurUserName: this.user,
+ CurUserName: sessionStorage["HUserName"],
},
}
);
@@ -1671,12 +1688,12 @@
let HInterID = form.HItemID || form.HInterID || form.hmainid;
try {
let res = await axios.get(
- `${this.baseURL}/Xs_SeOutStockBill/CancellXs_SeOutStockBill`,
+ `${this.$baseUrl}/Xs_SeOutStockBill/CancellXs_SeOutStockBill`,
{
params: {
HInterID: HInterID,
Type: num,
- user: this.user,
+ user: sessionStorage["HUserName"],
},
}
);
@@ -1697,8 +1714,12 @@
var InterID = form.HItemID || form.HInterID;
//閫昏緫瀹℃牳鏂规硶
axios
- .get(this.baseURL + "/Gy_Employee/StopGy_Employee", {
- params: { HInterID: InterID, IsStop: num, CurUserName: this.user },
+ .get(this.$baseUrl + "/Gy_Employee/StopGy_Employee", {
+ params: {
+ HInterID: InterID,
+ IsStop: num,
+ CurUserName: sessionStorage["HUserName"],
+ },
})
.then((res) => {
let result = res.data;
@@ -1764,10 +1785,10 @@
}
}
var sSubStr = JSON.stringify(num);
- var sMainSub = sSubStr + "&鍜�" + this.user;
+ var sMainSub = sSubStr + "&鍜�" + sessionStorage["HUserName"];
axios({
method: "post",
- url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
+ url: this.$baseUrl + "/Gy_Source/Gy_Source_btnSave",
data: {
sMainSub: sMainSub,
},
--
Gitblit v1.9.1