cxy
This commit is contained in:
@@ -87,6 +87,16 @@ export function searchProjectNumber() {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchProjectNumber2() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '合同信息管理_项目名称_总_查询_增加限制'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchProjectName(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
|
||||
@@ -7,10 +7,10 @@ export const wsuri = `ws://192.168.1.128:61101//WebMoudule//websocket`
|
||||
export const name = `OP8888`
|
||||
|
||||
// 创建axios实例
|
||||
export const upload = `http://123.56.95.229:8411/submit/uploadFile.ashx`
|
||||
export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx`
|
||||
export const upload = `http://localhost:8411/submit/uploadFile.ashx`
|
||||
export const download = `http://localhost:8411/submit/downloadFile.ashx`
|
||||
const service = axios.create({
|
||||
baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">新增</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd('department_Form')">新增</el-button>
|
||||
<el-button type="warning" icon="el-icon-edit" size="small" @click="handleEdit()">编辑</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="small" @click="deleteTable()">删除</el-button>
|
||||
</el-card>
|
||||
@@ -15,7 +15,8 @@
|
||||
<el-button slot="append" icon="el-icon-search" @click="fetchPeopleForName"/>
|
||||
</el-input>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addPeople()">新增</el-button>
|
||||
<!--<el-button v-popover:popover4 type="success" icon="el-icon-sort" size="small" @click="moveGroup">移动</el-button>-->
|
||||
<!--<el-button v-popover:popover4 type="success" icon="el-icon-sort" size="small" @click="moveGroup">移动-->
|
||||
<!--</el-button>-->
|
||||
<!--<el-button size="small" @click="postMaintain()">岗位维护</el-button>-->
|
||||
<!--<el-popover-->
|
||||
<!--ref="popover4"-->
|
||||
@@ -29,7 +30,9 @@
|
||||
<!--:disabled="true"-->
|
||||
<!--size="small"-->
|
||||
<!--placeholder="请选择部门"/>-->
|
||||
<!--<el-button type="text" size="small" style="margin-left: 60px; margin-top: 15px" @click="moveGroupConfim">确认</el-button>-->
|
||||
<!--<el-button type="text" size="small" style="margin-left: 60px; margin-top: 15px" @click="moveGroupConfim">-->
|
||||
<!--确认-->
|
||||
<!--</el-button>-->
|
||||
<!--<el-dropdown-menu slot="dropdown">-->
|
||||
<!--<el-tree-->
|
||||
<!--ref="treeForm"-->
|
||||
@@ -176,18 +179,18 @@
|
||||
</el-row>
|
||||
|
||||
<!--新增和编辑部门-->
|
||||
<!--<el-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">-->
|
||||
<!--<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">-->
|
||||
<!--<el-form-item label="部门名称" prop="DepartmentName">-->
|
||||
<!--<el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-form>-->
|
||||
<!--<div slot="footer" class="dialog-footer">-->
|
||||
<!--<el-button @click="cancel">取消</el-button>-->
|
||||
<!--<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd">确定</el-button>-->
|
||||
<!--<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit">确定</el-button>-->
|
||||
<!--</div>-->
|
||||
<!--</el-dialog>-->
|
||||
<el-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="department_Form" :model="department_Form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="部门名称" prop="DepartmentName">
|
||||
<el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd('department_Form')">确定</el-button>
|
||||
<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit('department_Form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="people_title" :visible.sync="people_DFV" center style="min-height: 200px" width="800px">
|
||||
<el-form ref="people_form" :rules="rules" :model="people_form" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
@@ -350,7 +353,8 @@ export default {
|
||||
Title: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||
PositionStatus: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||
Education: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||
Post: [{ required: true, message: '请输入', trigger: 'change' }]
|
||||
Post: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||
DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
|
||||
},
|
||||
SexData: [{
|
||||
value: 1,
|
||||
@@ -362,7 +366,9 @@ export default {
|
||||
EducationDate: [],
|
||||
PostData: [],
|
||||
multipleSelection: [],
|
||||
nodeName1: []
|
||||
nodeName1: [],
|
||||
count1: 0,
|
||||
count2: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -415,10 +421,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
handleAdd(formName) {
|
||||
this.department_Title = '新增部门'
|
||||
this.department_DFV = true
|
||||
this.addForm('department_Form')
|
||||
this.department_Form.DepartmentName = ''
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
},
|
||||
handleEdit() {
|
||||
this.addForm('department_Form')
|
||||
@@ -430,43 +440,75 @@ export default {
|
||||
this.$message.warning(`请选择要修改的部门`)
|
||||
}
|
||||
},
|
||||
submitAdd() {
|
||||
this.department_DFV = false
|
||||
if (this.id) {
|
||||
addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => {
|
||||
console.log(response.data[0].result === '1')
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTreeData()
|
||||
this.$message.success('添加成功')
|
||||
submitAdd(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.department_DFV = false
|
||||
if (this.id) {
|
||||
addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTreeData()
|
||||
this.$message.success('添加成功')
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTreeData()
|
||||
this.$message.success('添加成功')
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTreeData()
|
||||
this.$message.success('添加成功')
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
submitEdit() {
|
||||
this.department_DFV = false
|
||||
editList(this.id, this.department_Form.DepartmentName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTreeData()
|
||||
this.$message.success('编辑成功')
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.department_DFV = false
|
||||
editList(this.id, this.department_Form.DepartmentName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTreeData()
|
||||
this.$message.success('编辑成功')
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteTable() {
|
||||
if (this.id) {
|
||||
this.deleteRow(delList, this.id, function() { this.getTreeData() })
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delList(this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTreeData()
|
||||
this.i = 1
|
||||
this.id = ''
|
||||
this.$message({
|
||||
message: '已被成功删除',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(`请选择部门`)
|
||||
}
|
||||
@@ -504,6 +546,7 @@ export default {
|
||||
if (this.id) {
|
||||
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.i = 1
|
||||
this.handleNodeClick()
|
||||
this.$message.success('添加成功')
|
||||
} else {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<span style="margin-left: 10px">销售经理</span>
|
||||
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询收款计划</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增收款计划</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD('form2')">新增收款计划</el-button>
|
||||
<el-badge :value="value" :max="99" class="item">
|
||||
<el-button size="small" type="text" @click="AccountsReceivable">查看收款信息</el-button>
|
||||
</el-badge>
|
||||
@@ -42,11 +42,6 @@
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="发货状态" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.机床名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -119,12 +114,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--icon="el-icon-tickets"-->
|
||||
<!--:disabled="scope.row.是否禁用"-->
|
||||
<!--@click.stop="handleEdit(scope.row, scope.$index)">付款</el-button>-->
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用编辑"
|
||||
size="mini"
|
||||
@@ -180,11 +169,6 @@
|
||||
{{ scope.row.本次收款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="是否开票" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.是否开票 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -246,7 +230,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="danger" style="width: 80px">{{ scope.row.状态 }}</el-tag>
|
||||
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" size="small">无计划</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&parseInt(scope.row.未收金额)===0" type="success" size="small">已完成</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='未开始'" type="primary" size="small">未开始</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='即将拖期'" type="warning" size="small">即将拖期</el-tag>
|
||||
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='已拖期'" type="danger" size="small">已拖期</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="280">
|
||||
@@ -283,7 +271,7 @@
|
||||
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
|
||||
<el-select v-model="form2.entryNameValue" clearable filterable placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" @change="searchProjectName">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
v-for="item in entryName2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -486,7 +474,8 @@
|
||||
|
||||
<script>
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
||||
import { searchProjectNumber2, SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
@@ -500,7 +489,8 @@ export default {
|
||||
}
|
||||
}
|
||||
return {
|
||||
// disabled: false,
|
||||
entryName2: [],
|
||||
count1: 0,
|
||||
type: '',
|
||||
a: 1,
|
||||
b: 1,
|
||||
@@ -587,7 +577,7 @@ export default {
|
||||
rules: { // 表单验证规则
|
||||
ContractNumberValue: [{ required: true, message: '请输入合同编号', trigger: 'blur' }],
|
||||
TotalContractAmount: [{ required: true, message: '请输入合同总金额', trigger: 'blur' }],
|
||||
entryNameValue: [{ required: true, message: '请输入项目名称', trigger: 'change' }]
|
||||
entryNameValue: [{ required: true, message: '请选择项目名称', trigger: 'change' }]
|
||||
},
|
||||
rules1: { // 表单验证规则
|
||||
ThisPayment: [
|
||||
@@ -612,7 +602,6 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.fetchData()
|
||||
this.getTableData()
|
||||
this.init()
|
||||
},
|
||||
@@ -620,6 +609,7 @@ export default {
|
||||
init() {
|
||||
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
|
||||
this.getSelect(searchProjectNumber, ['项目名称', '项目流水号'], 'entryName')
|
||||
this.getSelect(searchProjectNumber2, ['项目名称', '项目流水号'], 'entryName2')
|
||||
this.getSelect(PaymentPhase, ['付款阶段', '付款阶段ID'], 'PaymentPhase')
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
@@ -685,7 +675,6 @@ export default {
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
// data[i].已支付 === '0' ? data[i].是否禁用编辑 = false : data[i].是否禁用编辑 = true
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
@@ -821,19 +810,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// fetchData() {
|
||||
// getTree().then(response => { // 获取人员信息树
|
||||
// const data = response.data
|
||||
// this.dataPeople = tree(data, 0)
|
||||
// })
|
||||
// },
|
||||
// handleNodeClick(data) { // 树节点点击
|
||||
// this.getData(getTablePeople, 'ListPeople', data.id)
|
||||
// },
|
||||
// handleChange(row) {
|
||||
// this.peopleid = row.人员编号
|
||||
// this.peoplename = row.姓名
|
||||
// },
|
||||
getName() {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.MarketingManagerValue = this.peoplename
|
||||
@@ -844,9 +820,11 @@ export default {
|
||||
this.peoplename = ''
|
||||
},
|
||||
searchProjectName() {
|
||||
searchProjectName(this.form2.entryNameValue).then(response => {
|
||||
this.form2.ContractNumberValue = response.data[0].合同编号
|
||||
})
|
||||
if (this.form2.entryNameValue !== '' && this.form2.entryNameValue !== null) {
|
||||
searchProjectName(this.form2.entryNameValue).then(response => {
|
||||
this.form2.ContractNumberValue = response.data[0].合同编号
|
||||
})
|
||||
}
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.contractTotal = parseFloat(row.合同总金额)
|
||||
@@ -910,7 +888,6 @@ export default {
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
// this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.moneyID], ['tableData2', 'total2', 'listLoading2'])
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
@@ -1051,8 +1028,14 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
ADD() {
|
||||
this.addForm('form2')
|
||||
ADD(formName) {
|
||||
this.form2.entryNameValue = ''
|
||||
this.form2.ContractNumberValue = ''
|
||||
this.form2.TotalContractAmount = ''
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.temp = 1
|
||||
},
|
||||
@@ -1102,11 +1085,6 @@ export default {
|
||||
},
|
||||
handleEdit1(row) {
|
||||
this.addForm('form3')
|
||||
// let sum = 0
|
||||
// this.tableData2.map(item => {
|
||||
// sum += parseFloat(item.本次付款)
|
||||
// })
|
||||
// this.max1 = this.contractTotal - (sum - row.本次付款)
|
||||
this.title = '记录阶段收款'
|
||||
this.max1 = parseFloat(row.应收金额) - parseFloat(row.已收金额)
|
||||
this.dialogFormVisible3 = true
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col :span="16"><div class="grid-content bg-purple">
|
||||
<el-col :span="17"><div class="grid-content bg-purple">
|
||||
<el-table
|
||||
v-loading="tableData2Loading"
|
||||
id="tb"
|
||||
@@ -27,7 +27,7 @@
|
||||
:data="tableData5"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
height="235"
|
||||
height="315"
|
||||
@row-click="searchCargoBox"
|
||||
>
|
||||
<el-table-column align="center" label="发货单号" width="150">
|
||||
@@ -65,6 +65,11 @@
|
||||
{{ scope.row.运输状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="签收人" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.签收人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="追溯码" width="150">
|
||||
<template slot-scope="scope">
|
||||
<canvas :id="canvas[scope.$index]"/>
|
||||
@@ -91,19 +96,22 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div></el-col>
|
||||
<el-col :span="8"><div class="grid-content bg-purple-light">
|
||||
<div style="width: 550px;height:236px; border: 2px solid rgb(228, 231, 237);margin-left: 5px">
|
||||
<!--<el-upload-->
|
||||
<!--style="margin-left: 10px"-->
|
||||
<!--action="https://jsonplaceholder.typicode.com/posts/"-->
|
||||
<!--list-type="picture-card"-->
|
||||
<!--:on-preview="handlePictureCardPreview"-->
|
||||
<!--:on-remove="handleRemove">-->
|
||||
<!--<i class="el-icon-plus"></i>-->
|
||||
<!--</el-upload>-->
|
||||
<!--<el-dialog :visible.sync="dialogVisible">-->
|
||||
<!--<img width="100%" :src="dialogImageUrl" alt="">-->
|
||||
<!--</el-dialog>-->
|
||||
<el-col :span="7"><div class="grid-content bg-purple-light">
|
||||
<div style="width: 473px;height:315px; border: 2px solid rgb(228, 231, 237);margin-left: 5px">
|
||||
<el-upload
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:file-list="fileList"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="onSuccess"
|
||||
:action="'http://192.168.1.122:8410/submit/upload2.ashx?InvoiceNum='+ invoiceNum"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img :src="dialogImageUrl" width="100%" alt="">
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</div></el-col>
|
||||
</el-row>
|
||||
@@ -510,6 +518,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
// import { sleep } from '@/utils/tool'
|
||||
import elInput from 'element-ui/packages/input'
|
||||
import { submitRremove, searchCargoBoxDetailed, submitMoveInto, delCargoBox, addCargoBox, searchCargoBox, editInvoice, delInvoice, addInvoice, editAdress, addAdress, deleteAdress, citySearch, provinceSearch, addressSearch, searchParts, searchHost, searchSparePart, searchProjectName, searchPackingList, searchFile, searchInvoice } from '@/api//MarketingCenter/DeliveryManagement'
|
||||
import QRCode from 'qrcode'
|
||||
@@ -522,6 +532,7 @@ export default {
|
||||
canvas: [],
|
||||
show: false,
|
||||
num: '',
|
||||
fileList: [],
|
||||
a: 1, // 嵌套表格交换变量
|
||||
b: 1, // 嵌套表格交换变量
|
||||
flag1: '', // 发货单旗帜变量
|
||||
@@ -584,6 +595,8 @@ export default {
|
||||
dialogFormVisible3: false, // 填充货箱内货物对话框显示隐藏
|
||||
dialogFormVisible4: false, // 移除货箱内货物对话框显示隐藏
|
||||
QueryDetail: '',
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
Transport: [
|
||||
{
|
||||
value: 0,
|
||||
@@ -885,6 +898,7 @@ export default {
|
||||
},
|
||||
searchCargoBox(row) {
|
||||
this.invoiceNum = row.发货单编号
|
||||
this.getFileList()
|
||||
this.getSelect(searchCargoBox, ['货箱号', '货箱号编号'], 'cargoBox', this.invoiceNum)
|
||||
},
|
||||
addCargoBox() {
|
||||
@@ -1032,6 +1046,7 @@ export default {
|
||||
this.form3.数量 = ''
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchCargoBoxDetailed()
|
||||
this.searchPackingListDetails()
|
||||
searchParts(this.code).then(response => {
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
@@ -1054,7 +1069,7 @@ export default {
|
||||
// 生成的二维码内容,可以添加变量
|
||||
this.QueryDetail = this.cargoBoxValue.toString()
|
||||
var canvas = document.getElementById('canvas')
|
||||
QRCode.toCanvas(canvas, this.QueryDetail, function(error) {
|
||||
QRCode.toCanvas(canvas, 'http://192.168.1.132:8080/#/searchBoxDetails/index?id=' + this.QueryDetail, function(error) {
|
||||
if (error) console.error(error)
|
||||
console.log('success!')
|
||||
})
|
||||
@@ -1064,11 +1079,67 @@ export default {
|
||||
},
|
||||
clear() {
|
||||
this.show = false
|
||||
},
|
||||
async getFileList() {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 发货管理_附件 where 是否启用 = 1 and 发货单编号 = ${this.invoiceNum}`
|
||||
}
|
||||
})
|
||||
this.fileList = data.map(item => {
|
||||
return {
|
||||
_id: item.附件号,
|
||||
name: item.文件标识,
|
||||
url: 'http://192.168.1.122:8410/webpage/img/' + item.文件标识
|
||||
}
|
||||
})
|
||||
},
|
||||
async handleRemove(file, fileList) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '4',
|
||||
name: `update 发货管理_附件 set 是否启用 = 0 where 附件号 = ${file._id}`
|
||||
}
|
||||
})
|
||||
if (data[0].result === '0') {
|
||||
this.$message.error('删除失败了。')
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
beforeUpload(file) {
|
||||
const isJPG = /^image\/.*/.test(file.type)
|
||||
const isLt4M = file.size / 1024 / 1024 < 4
|
||||
const isInvoiceNum = !!this.invoiceNum
|
||||
|
||||
if (!isInvoiceNum) {
|
||||
this.$message.error('请先选择装箱单。。')
|
||||
}
|
||||
|
||||
if (!isJPG) {
|
||||
this.$message.error('只能上传图片。。')
|
||||
}
|
||||
if (!isLt4M) {
|
||||
this.$message.error('上传头像图片大小不能超过 4MB!')
|
||||
}
|
||||
|
||||
return isJPG && isLt4M && isInvoiceNum
|
||||
},
|
||||
onSuccess(res, file, fileList) {
|
||||
fileList = []
|
||||
if (res[0].result === '1') {
|
||||
this.getFileList()
|
||||
} else {
|
||||
this.$message.error('上传失败')
|
||||
}
|
||||
}
|
||||
// clear() {
|
||||
// this.cargoBox = []
|
||||
// this.cargoBoxValue = ''
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user