|
|
@@ -8,17 +8,17 @@
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
<el-button class="el-button--small-yh" type="primary" size="small" v-if="editButton" @click="confirmEditing">编辑 </el-button>
|
|
|
- <el-button class="el-button--small-yh" type="primary" size="small" :disabled="isSave" @click="editCustomer">保存数据 </el-button>
|
|
|
+ <el-button v-else class="el-button--small-yh" type="primary" size="small" @click="editCustomer" :disabled="editDisabled">保存数据 </el-button>
|
|
|
<el-button
|
|
|
class="el-button--small-yh"
|
|
|
type="warning"
|
|
|
size="small"
|
|
|
v-if="form.statusName == '确认调拨'"
|
|
|
@click="revoke"
|
|
|
- :disabled="isSave || form.status == '是'"
|
|
|
+ :disabled=" form.status == '是'"
|
|
|
>撤销调拨
|
|
|
</el-button>
|
|
|
- <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;" v-else @click="complete" :disabled="isSave"
|
|
|
+ <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;" v-else @click="complete" :disabled="editDisabled"
|
|
|
>确认调拨
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -28,7 +28,7 @@
|
|
|
size="small"
|
|
|
style="margin-left: 6px;"
|
|
|
@click="confirmComplete"
|
|
|
- :disabled="isSave"
|
|
|
+ :disabled="form.status == '是'"
|
|
|
>已出仓
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -42,7 +42,7 @@
|
|
|
placeholder="调出仓库"
|
|
|
label="cname"
|
|
|
res="records"
|
|
|
- :disabled="isSave || isAddDisabled || form.shipItemsList.length"
|
|
|
+ :disabled="editDisabled || form.shipItemsList.length"
|
|
|
url="/blade-sales-part/storageDesc/list?current=1&size=5"
|
|
|
:filterable="true"
|
|
|
:remote="true"
|
|
|
@@ -56,7 +56,7 @@
|
|
|
placeholder="调入仓库"
|
|
|
label="cname"
|
|
|
res="records"
|
|
|
- :disabled="isSave || isAddDisabled || form.shipItemsList.length"
|
|
|
+ :disabled="editDisabled || form.shipItemsList.length"
|
|
|
url="/blade-sales-part/storageDesc/list?current=1&size=5"
|
|
|
:filterable="true"
|
|
|
:remote="true"
|
|
|
@@ -80,7 +80,7 @@
|
|
|
@saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 430)"
|
|
|
>
|
|
|
<template slot-scope="{ scope, row }" slot="menuLeft">
|
|
|
- <el-button type="primary" icon="el-icon-printer" size="small" @click="adddiailsfun">录入明细</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-printer" size="small" @click="adddiailsfun" :disabled="editDisabled">录入明细</el-button>
|
|
|
<el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
|
|
|
<el-popover width="800" trigger="click" placement="right">
|
|
|
<avue-crud :data="inventoryData" :option="inventoryOption">
|
|
|
@@ -89,13 +89,19 @@
|
|
|
type="text"
|
|
|
icon="el-icon-refresh"
|
|
|
size="small"
|
|
|
- :disabled="row.storageId != form.storageId"
|
|
|
+ :disabled="row.storageId != form.storageId || editDisabled"
|
|
|
@click.stop="synchronous(row)"
|
|
|
>更新库存
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
- <el-button type="primary" plain size="small" slot="reference" @click="viewInventory" :disabled="selectionMultilist.length != 1"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ slot="reference"
|
|
|
+ @click="viewInventory"
|
|
|
+ :disabled="selectionMultilist.length != 1 || editDisabled"
|
|
|
>同步库存</el-button
|
|
|
>
|
|
|
</el-popover>
|
|
|
@@ -104,7 +110,7 @@
|
|
|
<el-button
|
|
|
v-if="reservoirArea == 1 && row.historyList.length"
|
|
|
:size="size"
|
|
|
- :disabled="!row.id || disabled || isAddDisabled"
|
|
|
+ :disabled="!row.id || editDisabled"
|
|
|
type="text"
|
|
|
@click="rowDelArea(row, index)"
|
|
|
>
|
|
|
@@ -116,7 +122,7 @@
|
|
|
<el-button
|
|
|
v-if="reservoirArea == 1 && row.historyList.length == 0"
|
|
|
:size="size"
|
|
|
- :disabled="!row.id || disabled || isAddDisabled"
|
|
|
+ :disabled="!row.id || editDisabled"
|
|
|
type="text"
|
|
|
@click="rowArea(row, index)"
|
|
|
>
|
|
|
@@ -125,16 +131,14 @@
|
|
|
<el-button
|
|
|
v-if="reservoirArea != 1"
|
|
|
:size="size"
|
|
|
- :disabled="disabled || isAddDisabled"
|
|
|
+ :disabled="editDisabled"
|
|
|
:type="type"
|
|
|
:icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
@click="rowEdit(row, index)"
|
|
|
>
|
|
|
{{ row.$cellEdit ? "保存" : "编辑" }}
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type" @click="rowDelBox(row, index)"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="editDisabled" :type="type" @click="rowDelBox(row, index)">删除 </el-button>
|
|
|
</template>
|
|
|
<template slot="goodsNum" slot-scope="{ row }">
|
|
|
<el-input-number
|
|
|
@@ -196,12 +200,12 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
- <view-area ref="viewArea" @areaData="areaData" :disabled="disabled || isAddDisabled"></view-area>
|
|
|
+ <view-area ref="viewArea" @areaData="areaData" :disabled="editDisabled"></view-area>
|
|
|
<containerTitle title="上传附件"></containerTitle>
|
|
|
<c-upload
|
|
|
v-loading="loadingBtn"
|
|
|
typeUpload="LT"
|
|
|
- :disabled="isAddDisabled"
|
|
|
+ :disabled="editDisabled"
|
|
|
deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
|
|
|
:data="filesList"
|
|
|
display
|
|
|
@@ -288,11 +292,8 @@ export default {
|
|
|
|
|
|
switchDialog: false,
|
|
|
activeName: "sale_detail",
|
|
|
- editButton: true,
|
|
|
- isSave: true,
|
|
|
- disabled: false,
|
|
|
- isDisabled: false,
|
|
|
- isAddDisabled: false,
|
|
|
+ editButton: false,
|
|
|
+ editDisabled: false,
|
|
|
form: {
|
|
|
shipItemsList: [],
|
|
|
shipVOList: [],
|
|
|
@@ -304,27 +305,10 @@ export default {
|
|
|
menuBtn: false,
|
|
|
span: 8,
|
|
|
column: [
|
|
|
- // {
|
|
|
- // label: '业务对象',
|
|
|
- // disabled: false,
|
|
|
- // prop: "customerId",
|
|
|
- // type: 'select',
|
|
|
- // props: {
|
|
|
- // label: 'cname',
|
|
|
- // value: 'id'
|
|
|
- // },
|
|
|
- // dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&enableOrNot=1',
|
|
|
- // dicData:[],
|
|
|
- // rules: [{
|
|
|
- // required: true,
|
|
|
- // message: " ",
|
|
|
- // trigger: "blur"
|
|
|
- // }]
|
|
|
- // },
|
|
|
{
|
|
|
label: "调出仓库",
|
|
|
prop: "storageName",
|
|
|
- disabled: true,
|
|
|
+ disabled: false,
|
|
|
// type: "select",
|
|
|
// props: {
|
|
|
// label: "cname",
|
|
|
@@ -342,7 +326,7 @@ export default {
|
|
|
{
|
|
|
label: "调入仓库",
|
|
|
prop: "callInStorageName",
|
|
|
- disabled: true,
|
|
|
+ disabled: false,
|
|
|
// type: "select",
|
|
|
// props: {
|
|
|
// label: "cname",
|
|
|
@@ -361,7 +345,7 @@ export default {
|
|
|
label: "库管",
|
|
|
prop: "stockClerkId",
|
|
|
type: "select",
|
|
|
- disabled: true,
|
|
|
+ disabled: false,
|
|
|
props: {
|
|
|
label: "realName",
|
|
|
value: "id"
|
|
|
@@ -379,7 +363,7 @@ export default {
|
|
|
label: "业务日期",
|
|
|
prop: "businesDate",
|
|
|
searchProp: "businesDateList",
|
|
|
- disabled: true,
|
|
|
+ disabled: false,
|
|
|
type: "datetime",
|
|
|
value: dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss"),
|
|
|
format: "yyyy-MM-dd HH:mm",
|
|
|
@@ -417,7 +401,6 @@ export default {
|
|
|
optionContactsBack: {
|
|
|
align: "center",
|
|
|
index: true,
|
|
|
- addBtnText: "录入明细",
|
|
|
updateBtnText: "保存",
|
|
|
refreshBtn: false,
|
|
|
dialogDrag: true,
|
|
|
@@ -1001,23 +984,10 @@ export default {
|
|
|
});
|
|
|
this.key++;
|
|
|
if (this.detailData.id) {
|
|
|
- this.refresh();
|
|
|
- } else {
|
|
|
- this.optionForm.column.forEach(item => {
|
|
|
- if (item.prop == "remarks" || item.prop == "stockClerkId" || item.prop == "businesDate") {
|
|
|
- item.disabled = false;
|
|
|
- } else {
|
|
|
- item.disabled = true;
|
|
|
- }
|
|
|
- });
|
|
|
- this.editButton = false;
|
|
|
- this.isSave = false;
|
|
|
- }
|
|
|
- this.$store.commit("DOMIO_IN_ALLOCATW");
|
|
|
- },
|
|
|
- activated() {
|
|
|
- if (this.detailData.id) {
|
|
|
- this.refresh();
|
|
|
+ this.editButton = true;
|
|
|
+ this.editDisabled = true;
|
|
|
+ this.optionForm.disabled = true;
|
|
|
+ this.refresh(this.detailData.id);
|
|
|
}
|
|
|
this.$store.commit("DOMIO_IN_ALLOCATW");
|
|
|
},
|
|
|
@@ -1072,12 +1042,14 @@ export default {
|
|
|
this.$refs.viewArea.openDialog(this.form, row, index);
|
|
|
},
|
|
|
areaData(row, index) {
|
|
|
- console.log(row, index);
|
|
|
this.form.shipItemsList[index].dot = row.dot;
|
|
|
this.form.shipItemsList[index].goodsNum = row.sendNum;
|
|
|
this.form.shipItemsList[index].sendNumFinancing = row.sendNumFinancing;
|
|
|
this.form.shipItemsList[index].sendNumHave = row.sendNumHave;
|
|
|
this.form.shipItemsList[index].historyList = row.historyList;
|
|
|
+ this.form.shipItemsList[index].inventory = row.inventory;
|
|
|
+ this.form.shipItemsList[index].inventoryFinancing = row.inventoryFinancing;
|
|
|
+ this.form.shipItemsList[index].inventoryHave = row.inventoryHave;
|
|
|
},
|
|
|
viewInventory() {
|
|
|
inventoryList({
|
|
|
@@ -1115,8 +1087,7 @@ export default {
|
|
|
})
|
|
|
.then(res => {
|
|
|
this.$message.success("撤销成功");
|
|
|
- this.refresh(res.data.data.id);
|
|
|
- loading.close();
|
|
|
+ this.refresh(this.form.id, true);
|
|
|
})
|
|
|
.finally(() => {
|
|
|
loading.close();
|
|
|
@@ -1225,8 +1196,7 @@ export default {
|
|
|
})
|
|
|
.then(res => {
|
|
|
this.$message.success("调拨完成");
|
|
|
- this.refresh(res.data.data.id);
|
|
|
- loading.close();
|
|
|
+ this.refresh(this.form.id);
|
|
|
})
|
|
|
.finally(() => {
|
|
|
loading.close();
|
|
|
@@ -1259,9 +1229,7 @@ export default {
|
|
|
})
|
|
|
.then(res => {
|
|
|
this.$message.success("保存成功");
|
|
|
- this.editButton = true;
|
|
|
this.refresh(res.data.data.id);
|
|
|
- loading.close();
|
|
|
})
|
|
|
.finally(() => {
|
|
|
loading.close();
|
|
|
@@ -1272,70 +1240,31 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
refresh(id, type) {
|
|
|
- this.$set(this.optionContactsBack, "addBtn", false);
|
|
|
- this.$set(this.optionContacts, "addBtn", false);
|
|
|
- this.isDisabled = true;
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: "加载中",
|
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(255,255,255,0.7)"
|
|
|
});
|
|
|
- if (!this.detailData.id) {
|
|
|
- getDetails({ id: id })
|
|
|
- .then(res => {
|
|
|
- if (res.data.data.statusName == "确认调拨") {
|
|
|
- this.$set(this.optionForm, "disabled", true);
|
|
|
- this.isAddDisabled = true;
|
|
|
- this.optionContacts.column.forEach(item => {
|
|
|
- if (item.prop == "sendNum") {
|
|
|
- item.disabled = true;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- this.isAddDisabled = true;
|
|
|
- if (res.data.data.statusName == "录入") {
|
|
|
- this.isAddDisabled = true;
|
|
|
- this.isDisabled = true;
|
|
|
- }
|
|
|
- this.form = res.data.data;
|
|
|
- this.filesList = res.data.data.filesList;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.formContacts.refreshTable();
|
|
|
- });
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- loading.close();
|
|
|
- });
|
|
|
- } else {
|
|
|
- getDetails({ id: this.detailData.id })
|
|
|
- .then(res => {
|
|
|
- if (res.data.data.statusName == "已出库") {
|
|
|
- this.$set(this.optionForm, "disabled", true);
|
|
|
- this.isAddDisabled = true;
|
|
|
- this.optionContacts.column.forEach(item => {
|
|
|
- if (item.prop == "sendNum") {
|
|
|
- item.disabled = true;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- this.isAddDisabled = true;
|
|
|
- if (res.data.data.statusName == "待出库") {
|
|
|
- this.isAddDisabled = true;
|
|
|
- this.isDisabled = true;
|
|
|
- }
|
|
|
- this.form = res.data.data;
|
|
|
- this.filesList = res.data.data.filesList;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.formContacts.refreshTable();
|
|
|
- });
|
|
|
- loading.close();
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- loading.close();
|
|
|
+ getDetails({ id: id })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.data.statusName == "确认调拨") {
|
|
|
+ this.editDisabled = true;
|
|
|
+ this.optionForm.disabled = true;
|
|
|
+ }
|
|
|
+ if (type && !this.editButton) {
|
|
|
+ this.editDisabled = false;
|
|
|
+ this.optionForm.disabled = false;
|
|
|
+ }
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.filesList = res.data.data.filesList;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.formContacts.refreshTable();
|
|
|
});
|
|
|
- }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
},
|
|
|
rowDelBox(row, index) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
@@ -1370,7 +1299,11 @@ export default {
|
|
|
// 新增出库明细
|
|
|
adddiailsfun() {
|
|
|
if (!this.form.storageId) {
|
|
|
- this.$message.warning("请先选择调出仓库!");
|
|
|
+ this.$message.warning("请选择调出仓库!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!this.form.callInStorageId) {
|
|
|
+ this.$message.warning("请选择调入仓库!");
|
|
|
return;
|
|
|
}
|
|
|
this.$refs.dialogAssemblyRef.dialogVisible = true;
|
|
|
@@ -1379,42 +1312,14 @@ export default {
|
|
|
},
|
|
|
//编辑
|
|
|
confirmEditing() {
|
|
|
+ this.editButton = false;
|
|
|
if (this.form.statusName == "录入") {
|
|
|
- this.isDisabled = false;
|
|
|
- this.isSave = false;
|
|
|
- this.$set(this.optionForm, "disabled", false);
|
|
|
- this.optionForm.column.forEach(item => {
|
|
|
- if (item.prop == "remarks" || item.prop == "stockClerkId" || item.prop == "businesDate") {
|
|
|
- item.disabled = false;
|
|
|
- } else {
|
|
|
- item.disabled = true;
|
|
|
- }
|
|
|
- });
|
|
|
- // if (this.form.shipItemsList.length != 0) {
|
|
|
- // this.findObject(this.optionForm.column, "storageId").disabled = true;
|
|
|
- // }
|
|
|
-
|
|
|
- this.isAddDisabled = false;
|
|
|
- this.optionContactsBack.column.forEach(its => {
|
|
|
- if (its.prop == "dot") {
|
|
|
- this.$set(its, "disabled", false);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$set(this.optionForm, "disabled", false);
|
|
|
- this.isAddDisabled = true;
|
|
|
- this.isSave = false;
|
|
|
- // this.optionForm.column.forEach(item => {
|
|
|
- // if (item.prop == 'remarks') {
|
|
|
- // item.disabled = false
|
|
|
- // } else {
|
|
|
- // item.disabled = true
|
|
|
- // }
|
|
|
- // })
|
|
|
- this.optionForm.column.forEach(item => {
|
|
|
- item.disabled = true;
|
|
|
- });
|
|
|
- // this.isAddDisabled = false
|
|
|
+ this.editDisabled = false;
|
|
|
+ this.optionForm.disabled = false;
|
|
|
+ }
|
|
|
+ if (this.form.statusName == "确认调拨") {
|
|
|
+ this.editDisabled = true;
|
|
|
+ this.optionForm.disabled = true;
|
|
|
}
|
|
|
},
|
|
|
calculator(row) {
|