|
@@ -3,7 +3,21 @@
|
|
|
<byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
|
|
|
:selectConfig="selectConfig" :table-events="{
|
|
|
select: select,
|
|
|
- }" :action-list="[]" @get-list="getList" @moreSearch="() => (queryDialogVisible = true)">
|
|
|
+ }" :action-list="[]" @get-list="getList" @moreSearch="() => (queryDialogVisible = true)"
|
|
|
+ @updateTableRowClassName="tableRowClassName"
|
|
|
+ >
|
|
|
+
|
|
|
+ <template #remark="{ item }">
|
|
|
+ <div style="width: 200px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
|
|
+ <div v-if="item.hasEx == '1'" @click="showTipRemark(item)">
|
|
|
+ <i class="iconfont icon-iconm_banli" style="margin-right: 5px" ></i>
|
|
|
+ <span v-if="isNullOrUndefined(item.remark)">编辑备注</span>
|
|
|
+ <el-tooltip v-else class="item" effect="dark" :content="item.remark" placement="top">
|
|
|
+ {{item.remark}}
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</byTable>
|
|
|
<!--回告-->
|
|
|
<el-dialog :z-index="1500" title="采购单回告" v-if="tellDialogVisible" v-model="formData.data" width="1500px" v-loading="loading">
|
|
@@ -230,12 +244,28 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-descriptions title="采购单明细" />
|
|
|
+ <span>
|
|
|
+ (
|
|
|
+ <svg-icon icon-class="jdyl" style="width: 34px;"/> 多货
|
|
|
+ <svg-icon icon-class="jdks" style="width: 34px;"/> 少货
|
|
|
+ )
|
|
|
+ </span>
|
|
|
<el-table :data="formData.data.jdOrderDetailsList" stripe style="width: 100%">
|
|
|
<!-- <el-table stripe style="width: 100%">-->
|
|
|
- <el-table-column prop="wareId" label="京东商品编号" width="120">
|
|
|
+ <el-table-column prop="wareId" label="京东商品编号" width="175">
|
|
|
<template #default="scope">
|
|
|
+ <span v-if="scope.row.exDesc=='1'">
|
|
|
+ <svg-icon icon-class="jdyl" style="width: 34px;"/>
|
|
|
+ </span>
|
|
|
+ <span v-if="scope.row.exDesc=='2'">
|
|
|
+ <svg-icon icon-class="jdks" style="width: 34px;"/>
|
|
|
+ </span>
|
|
|
+
|
|
|
+
|
|
|
<span
|
|
|
- :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">{{scope.row.wareId}}</span>
|
|
|
+ :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">
|
|
|
+ {{scope.row.wareId}}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="wareName" label="京东商品名称" min-width="200">
|
|
@@ -262,6 +292,23 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!--修改备注-->
|
|
|
+ <el-dialog :z-index="1500" title="编辑备注" v-if="remarkDialogVisible" v-model="formData.data" width="800px" v-loading="loading">
|
|
|
+ <el-form label-width="auto" :rules="rules">
|
|
|
+ <el-row>
|
|
|
+ <el-col >
|
|
|
+ <el-form-item label="备注:" :span="8">
|
|
|
+ <el-input type="textarea" :rows="3" v-model="formData.data.remark" placeholder="请输入备注" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="remarkDialogVisible = false" size="large">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitRemark" size="large" :loading="submitLoadingRemark">提 交</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!--高级搜索-->
|
|
|
<el-dialog :title="'高级检索'" v-model="queryDialogVisible" width="500px" destroy-on-close>
|
|
|
<el-form :model="sourceList.pagination" label-width="100px" label-position="top">
|
|
@@ -285,6 +332,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
import { computed, nextTick, reactive, ref } from "vue";
|
|
|
+import {isNullOrUndefined} from "@tinymce/tinymce-vue/lib/es2015/main/ts/Utils";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
const router = useRouter();
|
|
@@ -295,6 +343,7 @@ const orderState = ref([]);
|
|
|
|
|
|
const blessingTypeList = ref([]);
|
|
|
const submitLoading = ref(false);
|
|
|
+const submitLoadingRemark = ref(false);
|
|
|
const sourceList = ref({
|
|
|
data: [],
|
|
|
pagination: {
|
|
@@ -312,10 +361,12 @@ let rules = ref({
|
|
|
{ required: true, message: "请输入不满足发货原因", trigger: "blur" },
|
|
|
],
|
|
|
confirmNum: [{ required: true, message: "请输入确认数量", trigger: "blur" }],
|
|
|
+ remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
|
|
|
});
|
|
|
|
|
|
const queryDialogVisible = ref(false);
|
|
|
const dialogVisible = ref(false);
|
|
|
+const remarkDialogVisible = ref(false);
|
|
|
const tellDialogVisible = ref(false);
|
|
|
|
|
|
let modalType = ref("add");
|
|
@@ -365,15 +416,29 @@ const selectConfig = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
label: "是否异常",
|
|
|
- prop: "isCanConfirm",
|
|
|
+ prop: "hasEx",
|
|
|
data: [
|
|
|
{
|
|
|
label: "异常",
|
|
|
- value: 1,
|
|
|
+ value: "1",
|
|
|
},
|
|
|
{
|
|
|
label: "无异常",
|
|
|
- value: 0,
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是否备注",
|
|
|
+ prop: "hasRemark",
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ label: "有备注",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "无备注",
|
|
|
+ value: "0",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -490,6 +555,31 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "备注",
|
|
|
+ slot: "remark",
|
|
|
+ width: 200,
|
|
|
+ align: "left",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // attrs: {
|
|
|
+ // label: "是否有异常",
|
|
|
+ // prop: "hasEx",
|
|
|
+ // align: "left",
|
|
|
+ // width: 100,
|
|
|
+ // },
|
|
|
+ // render(value) {
|
|
|
+ // let label = "未确认";
|
|
|
+ // if (value == "1") {
|
|
|
+ // label = "异常";
|
|
|
+ // } else if (value == "0") {
|
|
|
+ // label = "无异常";
|
|
|
+ // }
|
|
|
+ // return label;
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "是否确认",
|
|
|
prop: "businessStatus",
|
|
|
align: "left",
|
|
@@ -528,7 +618,7 @@ const config = computed(() => {
|
|
|
row.businessStatus == 0
|
|
|
? {
|
|
|
attrs: {
|
|
|
- label: "采购单确认",
|
|
|
+ label: "采购单确认(需出库)",
|
|
|
type: "danger",
|
|
|
text: true,
|
|
|
},
|
|
@@ -539,7 +629,25 @@ const config = computed(() => {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
- confirmBusinessStatus(row);
|
|
|
+ confirmBusinessStatus(row,true);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},row.businessStatus == 0
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "采购单确认(无需出库)",
|
|
|
+ type: "danger",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ ElMessageBox.confirm("是否确认当前采购单状态?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ confirmBusinessStatus(row,false);
|
|
|
});
|
|
|
},
|
|
|
}
|
|
@@ -630,6 +738,17 @@ const getList = async (req) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const tableRowClassName = (row, callback) => {
|
|
|
+ if (row.row.hasEx == 1) {
|
|
|
+ callback('error-row') ;
|
|
|
+ } else {
|
|
|
+ callback('') ;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
const openModal = () => {
|
|
|
dialogVisible.value = true;
|
|
|
modalType.value = "add";
|
|
@@ -660,16 +779,25 @@ const getTellDtl = (row) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const showTipRemark = (row) => {
|
|
|
+ remarkDialogVisible.value = true;
|
|
|
+ formData.data = {
|
|
|
+ id:row.id,
|
|
|
+ remark:row.remark
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
/**
|
|
|
* 确认采购单状态
|
|
|
* @param row
|
|
|
*/
|
|
|
-const confirmBusinessStatus = (row) => {
|
|
|
+const confirmBusinessStatus = (row,flag) => {
|
|
|
let businessStatus = row.businessStatus == "1" ? 0 : 1;
|
|
|
proxy
|
|
|
.post("/jdOrder/confirmBusinessStatus", {
|
|
|
id: row.id,
|
|
|
businessStatus: businessStatus,
|
|
|
+ isOut: flag,
|
|
|
})
|
|
|
.then(
|
|
|
() => {
|
|
@@ -715,6 +843,32 @@ const submitForm = () => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+//保存备注方法
|
|
|
+const submitRemark = () => {
|
|
|
+ ElMessageBox.confirm("是否保存备注?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ submitLoadingRemark.value = true;
|
|
|
+ proxy.post("/jdOrder/saveRemark", formData.data).then(
|
|
|
+ () => {
|
|
|
+ ElMessage({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ remarkDialogVisible.value = false;
|
|
|
+ submitLoadingRemark.value = false;
|
|
|
+ getList();
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log(err);
|
|
|
+ submitLoadingRemark.value = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
//高级搜索
|
|
|
const handleReset = () => {
|
|
|
sourceList.value.pagination = {
|
|
@@ -739,6 +893,8 @@ const handleQuery = () => {
|
|
|
getList();
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+
|
|
|
getDictlist();
|
|
|
getList();
|
|
|
</script>
|
|
@@ -750,4 +906,8 @@ getList();
|
|
|
:deep(.el-form-item--default) {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
+.el-table .error-row {
|
|
|
+ background: rgba(245, 108, 108, 0.68);
|
|
|
+}
|
|
|
+
|
|
|
</style>
|