备料
This commit is contained in:
@@ -349,12 +349,14 @@
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title2==='创建外购备料单'"
|
||||
:disabled="addPurchaseOrder_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddPurchaseOrder">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑外购备料单'"
|
||||
:disabled="addPurchaseOrder_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@@ -376,6 +378,7 @@ export default {
|
||||
name: '', // 采购计划
|
||||
data() {
|
||||
return {
|
||||
addPurchaseOrder_disable: false,
|
||||
dateRange: '',
|
||||
checktime: '',
|
||||
state: '',
|
||||
@@ -693,6 +696,7 @@ export default {
|
||||
this.form2.supplierNameValue = ''
|
||||
this.form2.供应商名称 = ''
|
||||
this.form2.计划完成日期 = ''
|
||||
this.addPurchaseOrder_disable = false
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
closedialog() {
|
||||
@@ -706,6 +710,7 @@ export default {
|
||||
submitAddPurchaseOrder() { // 新建采购单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.addPurchaseOrder_disable = true
|
||||
addPurchaseOrder(this.form2.采购单名称, this.form2.supplierNameValue, this.id, this.form2.计划完成日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建采购单成功')
|
||||
@@ -727,11 +732,13 @@ export default {
|
||||
this.form2.采购单名称 = row.采购单名称
|
||||
this.form2.supplierNameValue = row.供应商
|
||||
this.form2.计划完成日期 = row.计划完成日期
|
||||
this.addPurchaseOrder_disable = false
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitEditPurchaseOrder() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.addPurchaseOrder_disable = true
|
||||
editPurchaseOrder(this.form2.采购计划流水号, this.form2.采购单名称, this.form2.supplierNameValue, this.form2.计划完成日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改采购单成功')
|
||||
|
||||
@@ -217,12 +217,14 @@
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title==='新增到货单'"
|
||||
:disabled="addArrivalOrder_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddArrivalOrder">保存</el-button>
|
||||
<el-button
|
||||
v-show="title==='编辑到货单'"
|
||||
:disabled="addArrivalOrder_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@@ -518,6 +520,7 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addArrivalOrder_disable: false,
|
||||
mark: false,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
@@ -967,6 +970,7 @@ export default {
|
||||
searchNewOrder().then(response => {
|
||||
this.NewOrder = response.data[0].到货单号
|
||||
})
|
||||
this.addArrivalOrder_disable = false
|
||||
this.title = '新增到货单'
|
||||
this.form.备注 = ''
|
||||
this.form.supplierNameValue = ''
|
||||
@@ -985,12 +989,16 @@ export default {
|
||||
submitAddArrivalOrder() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.addArrivalOrder_disable = true
|
||||
addPurchaseOrder(this.form.备注, this.form.supplierNameValue, this.form.日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建到货单成功')
|
||||
this.searchTable4()
|
||||
this.dialogVisible = false
|
||||
} else { this.$message.error('新建到货单失败') }
|
||||
} else {
|
||||
this.addArrivalOrder_disable = false
|
||||
this.$message.error('新建到货单失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
@@ -1005,17 +1013,22 @@ export default {
|
||||
this.title = '编辑到货单'
|
||||
this.form.备注 = row.备注
|
||||
this.form.日期 = row.日期
|
||||
this.addArrivalOrder_disable = false
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submitEditArrivalOrder() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.addArrivalOrder_disable = true
|
||||
editPurchaseOrder(this.form.备注, this.到货单流水号, this.form.日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改到货单成功')
|
||||
this.searchTable4()
|
||||
this.dialogVisible = false
|
||||
} else { this.$message.error('修改到货单失败') }
|
||||
} else {
|
||||
this.$message.error('修改到货单失败')
|
||||
this.addArrivalOrder_disable = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -233,6 +233,7 @@
|
||||
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="350px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="80px">
|
||||
<el-form-item label="计划名称" prop="计划名称">
|
||||
@@ -251,6 +252,7 @@
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title2==='创建外购备料计划'"
|
||||
:disabled="addPurchaseOrder_disable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@@ -264,7 +266,6 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { getMachines, getGroups, getTable, searchSupplier, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchPurchaseOrder, AddMaterial, searchMX, saveWeight, deleteMX } from '@/api/WorkshopProcurement/OfflineProcurement'
|
||||
@@ -275,6 +276,7 @@ export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
addPurchaseOrder_disable: false,
|
||||
check1: 0,
|
||||
purchasingOrder: '',
|
||||
supplierName: '',
|
||||
@@ -512,18 +514,23 @@ export default {
|
||||
this.form2.计划名称 = ''
|
||||
this.form2.supplierNameValue = ''
|
||||
this.title2 = '创建外购备料计划'
|
||||
this.addPurchaseOrder_disable = false
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitAddPurchaseOrder() { // 新建采购单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.addPurchaseOrder_disable = true
|
||||
this.supplierName = this.form2.supplierNameValue
|
||||
addPurchaseOrder(this.form2.计划名称, this.form2.supplierNameValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建离线外购备料成功')
|
||||
this.searchTable()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('新建离线外购备料失败') }
|
||||
} else {
|
||||
this.addPurchaseOrder_disable = false
|
||||
this.$message.error('新建离线外购备料失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
|
||||
<el-button :disabled="addTable1_disable" size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-positive="'float'" v-model="SUM" size="mini" type="number" style="width: 80px; margin: 10px 10px 0 10px" @change="Keeptwodecimalplaces"/>元</span>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="float:right;margin: 10px 10px 0 10px" @click="addMateriel">货票关联</el-button>
|
||||
<el-button :disabled="aboutArrival_disable" type="primary" size="small" icon="el-icon-download" style="float:right;margin: 10px 10px 0 10px" @click="addMateriel">货票关联</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -290,6 +290,8 @@ export default {
|
||||
name: '', // 发票交接单
|
||||
data() {
|
||||
return {
|
||||
addTable1_disable: false,
|
||||
aboutArrival_disable: false,
|
||||
dateRange: '',
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
@@ -476,13 +478,13 @@ export default {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.tableData4 = []
|
||||
this.dialogVisible1 = true
|
||||
console.log(this.supplierNames)
|
||||
this.form1.supplierNameValue = ''
|
||||
this.form1.Number = ''
|
||||
this.form1.invoiceTime = ''
|
||||
this.form1.money = ''
|
||||
this.form1.remark = ''
|
||||
this.addTable1_disable = false
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
submitAdd1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
@@ -490,6 +492,7 @@ export default {
|
||||
if (this.arrest.length === 0) {
|
||||
this.$message.warning('请勾选需要关联的到货单')
|
||||
} else {
|
||||
this.addTable1_disable = true
|
||||
this.到货单流水号组 = []
|
||||
this.arrest.map(v => {
|
||||
this.到货单流水号组.push(v.到货单流水号)
|
||||
@@ -500,6 +503,7 @@ export default {
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.addTable1_disable = false
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
@@ -565,8 +569,9 @@ export default {
|
||||
aboutArrival(row) {
|
||||
this.Name = row.供应商
|
||||
this.发票流水号 = row.发票流水号
|
||||
this.dialogVisible = true
|
||||
this.searchTable4()
|
||||
this.aboutArrival_disable = false
|
||||
this.dialogVisible = true
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.SUM = 0
|
||||
@@ -581,6 +586,7 @@ export default {
|
||||
if (this.arrest.length === 0) {
|
||||
this.$message.warning('请勾选需要关联的到货单')
|
||||
} else {
|
||||
this.aboutArrival_disable = true
|
||||
this.到货单流水号组 = []
|
||||
this.arrest.map(v => {
|
||||
this.到货单流水号组.push(v.到货单流水号)
|
||||
@@ -592,7 +598,10 @@ export default {
|
||||
searchInvoiceDetail(this.发票流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
} else { this.$message.error('关联失败') }
|
||||
} else {
|
||||
this.aboutArrival_disable = false
|
||||
this.$message.error('关联失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -184,19 +184,21 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 90px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">提交请款审批</el-button>
|
||||
<el-button :disabled="requestFund_disable" type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">提交请款审批</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>import { searchRequestFund, searchOfflineContract, searchOfflineContract1, submitRequestFund, searchRequsetFundDetail, cancelRequestFund, deleteRequsetFundMX } from '@/api/WorkshopProcurement/RequestOutsourcingMaterials'
|
||||
<script>
|
||||
import { searchRequestFund, searchOfflineContract, searchOfflineContract1, submitRequestFund, searchRequsetFundDetail, cancelRequestFund, deleteRequsetFundMX } from '@/api/WorkshopProcurement/RequestOutsourcingMaterials'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
requestFund_disable: false,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
dateRange: '',
|
||||
@@ -362,10 +364,11 @@ export default {
|
||||
},
|
||||
requestFund() { // 请款
|
||||
// this.searchTable01()
|
||||
this.dialogVisible2 = true
|
||||
this.supplierValue = ''
|
||||
this.fetchData() // 重新获取供应商
|
||||
this.tableData01 = []
|
||||
this.requestFund_disable = false
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
if (this.supplierValue !== null) {
|
||||
@@ -391,6 +394,7 @@ export default {
|
||||
},
|
||||
submitRequestFund() { // 确认请款
|
||||
if (this.supplierValue && this.contractGroup.length !== 0) {
|
||||
this.requestFund_disable = true
|
||||
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('请款成功')
|
||||
|
||||
Reference in New Issue
Block a user